From d10b956da2cbdd09ea66e1cb2fe5922f07acc883 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 20 Sep 2023 09:55:30 -0600 Subject: [PATCH] re-export `ssz_rs` prelude in `ethereum-consensus` --- .../state_transition_across_multiple_forks.rs | 2 +- ethereum-consensus/src/altair/beacon_block.rs | 2 +- ethereum-consensus/src/altair/beacon_state.rs | 2 +- .../src/altair/block_processing.rs | 2 +- ethereum-consensus/src/altair/fork.rs | 1 - ethereum-consensus/src/altair/genesis.rs | 2 +- ethereum-consensus/src/altair/helpers.rs | 2 +- ethereum-consensus/src/altair/light_client.rs | 2 +- ethereum-consensus/src/altair/networking.rs | 2 +- ethereum-consensus/src/altair/spec/mod.rs | 3 +- ethereum-consensus/src/altair/sync.rs | 6 +- ethereum-consensus/src/altair/validator.rs | 6 +- .../src/bellatrix/beacon_block.rs | 2 +- .../src/bellatrix/beacon_state.rs | 2 +- .../src/bellatrix/blinded_beacon_block.rs | 2 +- .../src/bellatrix/block_processing.rs | 2 +- .../src/bellatrix/execution_engine.rs | 1 - .../src/bellatrix/execution_payload.rs | 3 +- ethereum-consensus/src/bellatrix/fork.rs | 1 - .../src/bellatrix/fork_choice.rs | 3 +- ethereum-consensus/src/bellatrix/genesis.rs | 2 +- ethereum-consensus/src/bellatrix/spec/mod.rs | 3 +- .../src/bellatrix/state_transition.rs | 2 +- ethereum-consensus/src/builder/mod.rs | 2 +- .../src/capella/beacon_block.rs | 2 +- .../src/capella/beacon_state.rs | 2 +- .../src/capella/blinded_beacon_block.rs | 2 +- .../src/capella/block_processing.rs | 2 +- .../src/capella/bls_to_execution_change.rs | 6 +- .../src/capella/epoch_processing.rs | 2 +- .../src/capella/execution_engine.rs | 1 - .../src/capella/execution_payload.rs | 3 +- ethereum-consensus/src/capella/fork.rs | 1 - ethereum-consensus/src/capella/genesis.rs | 2 +- ethereum-consensus/src/capella/spec/mod.rs | 3 +- ethereum-consensus/src/capella/withdrawal.rs | 6 +- ethereum-consensus/src/crypto.rs | 3 +- ethereum-consensus/src/deneb/beacon_block.rs | 2 +- ethereum-consensus/src/deneb/beacon_state.rs | 2 +- .../src/deneb/blinded_beacon_block.rs | 2 +- .../src/deneb/blinded_blob_sidecar.rs | 2 +- ethereum-consensus/src/deneb/blob_sidecar.rs | 3 +- .../src/deneb/block_processing.rs | 2 +- .../src/deneb/execution_engine.rs | 1 - .../src/deneb/execution_payload.rs | 3 +- ethereum-consensus/src/deneb/fork.rs | 1 - ethereum-consensus/src/deneb/genesis.rs | 2 +- ethereum-consensus/src/deneb/spec/mod.rs | 3 +- ethereum-consensus/src/kzg.rs | 3 +- ethereum-consensus/src/phase0/beacon_block.rs | 2 +- ethereum-consensus/src/phase0/beacon_state.rs | 2 +- .../src/phase0/block_processing.rs | 3 +- .../src/phase0/epoch_processing.rs | 2 +- ethereum-consensus/src/phase0/genesis.rs | 2 +- ethereum-consensus/src/phase0/helpers.rs | 2 +- ethereum-consensus/src/phase0/networking.rs | 3 +- ethereum-consensus/src/phase0/operations.rs | 2 +- .../src/phase0/slot_processing.rs | 2 +- .../src/phase0/state_transition.rs | 2 +- ethereum-consensus/src/phase0/validator.rs | 2 +- ethereum-consensus/src/primitives.rs | 6 +- ethereum-consensus/src/signing.rs | 2 +- ethereum-consensus/src/ssz/byte_list.rs | 6 +- ethereum-consensus/src/ssz/byte_vector.rs | 4 +- ethereum-consensus/src/ssz/mod.rs | 6 +- .../src/state_transition/error.rs | 2 +- .../pyspec_tests/mod.rs | 1 - .../eth_1_data_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../inactivity_updates/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../randao_mixes_reset/pyspec_tests/mod.rs | 1 - .../registry_updates/pyspec_tests/mod.rs | 1 - .../rewards_and_penalties/pyspec_tests/mod.rs | 1 - .../slashings/pyspec_tests/mod.rs | 1 - .../slashings_reset/pyspec_tests/mod.rs | 1 - .../finality/finality/pyspec_tests/mod.rs | 1 - .../altair/fork/fork/pyspec_tests/mod.rs | 1 - .../attestation/pyspec_tests/mod.rs | 1 - .../attester_slashing/pyspec_tests/mod.rs | 1 - .../block_header/pyspec_tests/mod.rs | 1 - .../operations/deposit/pyspec_tests/mod.rs | 1 - .../proposer_slashing/pyspec_tests/mod.rs | 1 - .../sync_aggregate/pyspec_tests/mod.rs | 1 - .../voluntary_exit/pyspec_tests/mod.rs | 1 - .../altair/random/random/pyspec_tests/mod.rs | 1 - .../altair/rewards/basic/pyspec_tests/mod.rs | 1 - .../altair/rewards/leak/pyspec_tests/mod.rs | 1 - .../altair/rewards/random/pyspec_tests/mod.rs | 1 - .../altair/sanity/blocks/pyspec_tests/mod.rs | 1 - .../altair/sanity/slots/pyspec_tests/mod.rs | 1 - .../aggregate_and_proof/ssz_random/mod.rs | 28 ++-- .../ssz_static/attestation/ssz_random/mod.rs | 28 ++-- .../attestation_data/ssz_random/mod.rs | 28 ++-- .../attester_slashing/ssz_random/mod.rs | 28 ++-- .../ssz_static/beacon_block/ssz_random/mod.rs | 28 ++-- .../beacon_block_body/ssz_random/mod.rs | 28 ++-- .../beacon_block_header/ssz_random/mod.rs | 28 ++-- .../ssz_static/beacon_state/ssz_random/mod.rs | 28 ++-- .../ssz_static/checkpoint/ssz_random/mod.rs | 28 ++-- .../contribution_and_proof/ssz_random/mod.rs | 28 ++-- .../ssz_static/deposit/ssz_random/mod.rs | 28 ++-- .../ssz_static/deposit_data/ssz_random/mod.rs | 28 ++-- .../deposit_message/ssz_random/mod.rs | 28 ++-- .../ssz_static/eth_1_block/ssz_random/mod.rs | 28 ++-- .../ssz_static/eth_1_data/ssz_random/mod.rs | 28 ++-- .../altair/ssz_static/fork/ssz_random/mod.rs | 23 ++- .../ssz_static/fork_data/ssz_random/mod.rs | 28 ++-- .../historical_batch/ssz_random/mod.rs | 28 ++-- .../indexed_attestation/ssz_random/mod.rs | 28 ++-- .../light_client_update/ssz_random/mod.rs | 28 ++-- .../pending_attestation/ssz_random/mod.rs | 28 ++-- .../proposer_slashing/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../signed_beacon_block/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../signed_voluntary_exit/ssz_random/mod.rs | 28 ++-- .../ssz_static/signing_data/ssz_random/mod.rs | 28 ++-- .../sync_aggregate/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../sync_committee/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../sync_committee_message/ssz_random/mod.rs | 28 ++-- .../ssz_static/validator/ssz_random/mod.rs | 28 ++-- .../voluntary_exit/ssz_random/mod.rs | 28 ++-- .../transition/core/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../eth_1_data_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../inactivity_updates/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../randao_mixes_reset/pyspec_tests/mod.rs | 1 - .../registry_updates/pyspec_tests/mod.rs | 1 - .../rewards_and_penalties/pyspec_tests/mod.rs | 1 - .../slashings/pyspec_tests/mod.rs | 1 - .../slashings_reset/pyspec_tests/mod.rs | 1 - .../finality/finality/pyspec_tests/mod.rs | 1 - .../bellatrix/fork/fork/pyspec_tests/mod.rs | 1 - .../attestation/pyspec_tests/mod.rs | 1 - .../attester_slashing/pyspec_tests/mod.rs | 1 - .../block_header/pyspec_tests/mod.rs | 1 - .../operations/deposit/pyspec_tests/mod.rs | 1 - .../execution_payload/pyspec_tests/mod.rs | 1 - .../proposer_slashing/pyspec_tests/mod.rs | 1 - .../sync_aggregate/pyspec_tests/mod.rs | 1 - .../voluntary_exit/pyspec_tests/mod.rs | 1 - .../random/random/pyspec_tests/mod.rs | 1 - .../rewards/basic/pyspec_tests/mod.rs | 1 - .../rewards/leak/pyspec_tests/mod.rs | 1 - .../rewards/random/pyspec_tests/mod.rs | 1 - .../sanity/blocks/pyspec_tests/mod.rs | 1 - .../sanity/slots/pyspec_tests/mod.rs | 1 - .../aggregate_and_proof/ssz_random/mod.rs | 28 ++-- .../ssz_static/attestation/ssz_random/mod.rs | 28 ++-- .../attestation_data/ssz_random/mod.rs | 28 ++-- .../attester_slashing/ssz_random/mod.rs | 28 ++-- .../ssz_static/beacon_block/ssz_random/mod.rs | 28 ++-- .../beacon_block_body/ssz_random/mod.rs | 28 ++-- .../beacon_block_header/ssz_random/mod.rs | 28 ++-- .../ssz_static/beacon_state/ssz_random/mod.rs | 28 ++-- .../ssz_static/checkpoint/ssz_random/mod.rs | 28 ++-- .../contribution_and_proof/ssz_random/mod.rs | 28 ++-- .../ssz_static/deposit/ssz_random/mod.rs | 28 ++-- .../ssz_static/deposit_data/ssz_random/mod.rs | 28 ++-- .../deposit_message/ssz_random/mod.rs | 28 ++-- .../ssz_static/eth_1_block/ssz_random/mod.rs | 28 ++-- .../ssz_static/eth_1_data/ssz_random/mod.rs | 28 ++-- .../execution_payload/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../ssz_static/fork/ssz_random/mod.rs | 23 ++- .../ssz_static/fork_data/ssz_random/mod.rs | 28 ++-- .../historical_batch/ssz_random/mod.rs | 28 ++-- .../indexed_attestation/ssz_random/mod.rs | 28 ++-- .../light_client_update/ssz_random/mod.rs | 28 ++-- .../pending_attestation/ssz_random/mod.rs | 28 ++-- .../ssz_static/pow_block/ssz_random/mod.rs | 28 ++-- .../proposer_slashing/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../signed_beacon_block/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../signed_voluntary_exit/ssz_random/mod.rs | 28 ++-- .../ssz_static/signing_data/ssz_random/mod.rs | 28 ++-- .../sync_aggregate/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../sync_committee/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../sync_committee_message/ssz_random/mod.rs | 28 ++-- .../ssz_static/validator/ssz_random/mod.rs | 28 ++-- .../voluntary_exit/ssz_random/mod.rs | 28 ++-- .../transition/core/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../eth_1_data_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../randao_mixes_reset/pyspec_tests/mod.rs | 1 - .../registry_updates/pyspec_tests/mod.rs | 1 - .../rewards_and_penalties/pyspec_tests/mod.rs | 1 - .../slashings/pyspec_tests/mod.rs | 1 - .../slashings_reset/pyspec_tests/mod.rs | 1 - .../finality/finality/pyspec_tests/mod.rs | 1 - .../attestation/pyspec_tests/mod.rs | 1 - .../attester_slashing/pyspec_tests/mod.rs | 1 - .../block_header/pyspec_tests/mod.rs | 1 - .../operations/deposit/pyspec_tests/mod.rs | 1 - .../proposer_slashing/pyspec_tests/mod.rs | 1 - .../voluntary_exit/pyspec_tests/mod.rs | 1 - .../phase0/random/random/pyspec_tests/mod.rs | 1 - .../phase0/rewards/basic/pyspec_tests/mod.rs | 1 - .../phase0/rewards/leak/pyspec_tests/mod.rs | 1 - .../phase0/rewards/random/pyspec_tests/mod.rs | 1 - .../phase0/sanity/blocks/pyspec_tests/mod.rs | 1 - .../phase0/sanity/slots/pyspec_tests/mod.rs | 1 - .../aggregate_and_proof/ssz_random/mod.rs | 28 ++-- .../ssz_static/attestation/ssz_random/mod.rs | 28 ++-- .../attestation_data/ssz_random/mod.rs | 28 ++-- .../attester_slashing/ssz_random/mod.rs | 28 ++-- .../ssz_static/beacon_block/ssz_random/mod.rs | 28 ++-- .../beacon_block_body/ssz_random/mod.rs | 28 ++-- .../beacon_block_header/ssz_random/mod.rs | 28 ++-- .../ssz_static/beacon_state/ssz_random/mod.rs | 28 ++-- .../ssz_static/checkpoint/ssz_random/mod.rs | 28 ++-- .../ssz_static/deposit/ssz_random/mod.rs | 28 ++-- .../ssz_static/deposit_data/ssz_random/mod.rs | 28 ++-- .../deposit_message/ssz_random/mod.rs | 28 ++-- .../ssz_static/eth_1_block/ssz_random/mod.rs | 28 ++-- .../ssz_static/eth_1_data/ssz_random/mod.rs | 28 ++-- .../phase0/ssz_static/fork/ssz_random/mod.rs | 23 ++- .../ssz_static/fork_data/ssz_random/mod.rs | 28 ++-- .../historical_batch/ssz_random/mod.rs | 28 ++-- .../indexed_attestation/ssz_random/mod.rs | 28 ++-- .../pending_attestation/ssz_random/mod.rs | 28 ++-- .../proposer_slashing/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../signed_beacon_block/ssz_random/mod.rs | 28 ++-- .../ssz_random/mod.rs | 28 ++-- .../signed_voluntary_exit/ssz_random/mod.rs | 28 ++-- .../ssz_static/signing_data/ssz_random/mod.rs | 28 ++-- .../ssz_static/validator/ssz_random/mod.rs | 28 ++-- .../voluntary_exit/ssz_random/mod.rs | 28 ++-- .../pyspec_tests/mod.rs | 1 - .../eth_1_data_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../inactivity_updates/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../randao_mixes_reset/pyspec_tests/mod.rs | 1 - .../registry_updates/pyspec_tests/mod.rs | 1 - .../rewards_and_penalties/pyspec_tests/mod.rs | 1 - .../slashings/pyspec_tests/mod.rs | 1 - .../slashings_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../finality/finality/pyspec_tests/mod.rs | 1 - .../altair/fork/fork/pyspec_tests/mod.rs | 1 - .../initialization/pyspec_tests/mod.rs | 1 - .../genesis/validity/pyspec_tests/mod.rs | 1 - .../attestation/pyspec_tests/mod.rs | 1 - .../attester_slashing/pyspec_tests/mod.rs | 1 - .../block_header/pyspec_tests/mod.rs | 1 - .../operations/deposit/pyspec_tests/mod.rs | 1 - .../proposer_slashing/pyspec_tests/mod.rs | 1 - .../sync_aggregate/pyspec_tests/mod.rs | 1 - .../voluntary_exit/pyspec_tests/mod.rs | 1 - .../altair/random/random/pyspec_tests/mod.rs | 1 - .../altair/rewards/basic/pyspec_tests/mod.rs | 1 - .../altair/rewards/leak/pyspec_tests/mod.rs | 1 - .../altair/rewards/random/pyspec_tests/mod.rs | 1 - .../altair/sanity/blocks/pyspec_tests/mod.rs | 1 - .../altair/sanity/slots/pyspec_tests/mod.rs | 1 - .../aggregate_and_proof/ssz_lengthy/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_max/mod.rs | 8 +- .../aggregate_and_proof/ssz_nil/mod.rs | 8 +- .../aggregate_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_zero/mod.rs | 8 +- .../ssz_static/attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_max/mod.rs | 8 +- .../ssz_static/attestation/ssz_nil/mod.rs | 8 +- .../ssz_static/attestation/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_random/mod.rs | 153 +++++++++++------- .../attestation/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_zero/mod.rs | 8 +- .../attestation_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_max/mod.rs | 8 +- .../attestation_data/ssz_nil/mod.rs | 8 +- .../attestation_data/ssz_one/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_random/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_zero/mod.rs | 8 +- .../attester_slashing/ssz_lengthy/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_max/mod.rs | 8 +- .../attester_slashing/ssz_nil/mod.rs | 8 +- .../attester_slashing/ssz_one/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_random/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_zero/mod.rs | 8 +- .../beacon_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_max/mod.rs | 8 +- .../ssz_static/beacon_block/ssz_nil/mod.rs | 8 +- .../ssz_static/beacon_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_zero/mod.rs | 8 +- .../beacon_block_body/ssz_lengthy/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_max/mod.rs | 8 +- .../beacon_block_body/ssz_nil/mod.rs | 8 +- .../beacon_block_body/ssz_one/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_zero/mod.rs | 8 +- .../beacon_block_header/ssz_lengthy/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_max/mod.rs | 8 +- .../beacon_block_header/ssz_nil/mod.rs | 8 +- .../beacon_block_header/ssz_one/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_zero/mod.rs | 8 +- .../beacon_state/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_max/mod.rs | 8 +- .../ssz_static/beacon_state/ssz_nil/mod.rs | 8 +- .../ssz_static/beacon_state/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_state/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_zero/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_max/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_nil/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_random/mod.rs | 153 +++++++++++------- .../checkpoint/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_zero/mod.rs | 8 +- .../contribution_and_proof/ssz_lengthy/mod.rs | 153 +++++++++++------- .../contribution_and_proof/ssz_max/mod.rs | 8 +- .../contribution_and_proof/ssz_nil/mod.rs | 8 +- .../contribution_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../contribution_and_proof/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../contribution_and_proof/ssz_zero/mod.rs | 8 +- .../ssz_static/deposit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../altair/ssz_static/deposit/ssz_max/mod.rs | 8 +- .../altair/ssz_static/deposit/ssz_nil/mod.rs | 8 +- .../altair/ssz_static/deposit/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/deposit/ssz_random/mod.rs | 153 +++++++++++------- .../deposit/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../altair/ssz_static/deposit/ssz_zero/mod.rs | 8 +- .../deposit_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_max/mod.rs | 8 +- .../ssz_static/deposit_data/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_random/mod.rs | 153 +++++++++++------- .../deposit_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_zero/mod.rs | 8 +- .../deposit_message/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_message/ssz_max/mod.rs | 8 +- .../ssz_static/deposit_message/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit_message/ssz_one/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_random/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_zero/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_max/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_nil/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_random/mod.rs | 153 +++++++++++------- .../eth_1_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_zero/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_max/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_nil/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_random/mod.rs | 153 +++++++++++------- .../eth_1_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_zero/mod.rs | 8 +- .../altair/ssz_static/fork/ssz_lengthy/mod.rs | 123 +++++++------- .../altair/ssz_static/fork/ssz_max/mod.rs | 7 +- .../altair/ssz_static/fork/ssz_nil/mod.rs | 7 +- .../altair/ssz_static/fork/ssz_one/mod.rs | 123 +++++++------- .../altair/ssz_static/fork/ssz_random/mod.rs | 123 +++++++------- .../ssz_static/fork/ssz_random_chaos/mod.rs | 123 +++++++------- .../altair/ssz_static/fork/ssz_zero/mod.rs | 7 +- .../ssz_static/fork_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_max/mod.rs | 8 +- .../ssz_static/fork_data/ssz_nil/mod.rs | 8 +- .../ssz_static/fork_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_random/mod.rs | 153 +++++++++++------- .../fork_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_zero/mod.rs | 8 +- .../historical_batch/ssz_lengthy/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_max/mod.rs | 8 +- .../historical_batch/ssz_nil/mod.rs | 8 +- .../historical_batch/ssz_one/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_random/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_zero/mod.rs | 8 +- .../indexed_attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_max/mod.rs | 8 +- .../indexed_attestation/ssz_nil/mod.rs | 8 +- .../indexed_attestation/ssz_one/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_zero/mod.rs | 8 +- .../light_client_update/ssz_lengthy/mod.rs | 153 +++++++++++------- .../light_client_update/ssz_max/mod.rs | 8 +- .../light_client_update/ssz_nil/mod.rs | 8 +- .../light_client_update/ssz_one/mod.rs | 153 +++++++++++------- .../light_client_update/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../light_client_update/ssz_zero/mod.rs | 8 +- .../pending_attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_max/mod.rs | 8 +- .../pending_attestation/ssz_nil/mod.rs | 8 +- .../pending_attestation/ssz_one/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_zero/mod.rs | 8 +- .../proposer_slashing/ssz_lengthy/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_max/mod.rs | 8 +- .../proposer_slashing/ssz_nil/mod.rs | 8 +- .../proposer_slashing/ssz_one/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_random/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_aggregate_and_proof/ssz_max/mod.rs | 8 +- .../signed_aggregate_and_proof/ssz_nil/mod.rs | 8 +- .../signed_aggregate_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../signed_beacon_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_max/mod.rs | 8 +- .../signed_beacon_block/ssz_nil/mod.rs | 8 +- .../signed_beacon_block/ssz_one/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_beacon_block_header/ssz_max/mod.rs | 8 +- .../signed_beacon_block_header/ssz_nil/mod.rs | 8 +- .../signed_beacon_block_header/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_max/mod.rs | 8 +- .../ssz_nil/mod.rs | 8 +- .../ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../signed_voluntary_exit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_max/mod.rs | 8 +- .../signed_voluntary_exit/ssz_nil/mod.rs | 8 +- .../signed_voluntary_exit/ssz_one/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_zero/mod.rs | 8 +- .../signing_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_max/mod.rs | 8 +- .../ssz_static/signing_data/ssz_nil/mod.rs | 8 +- .../ssz_static/signing_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_random/mod.rs | 153 +++++++++++------- .../signing_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_zero/mod.rs | 8 +- .../sync_aggregate/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/sync_aggregate/ssz_max/mod.rs | 8 +- .../ssz_static/sync_aggregate/ssz_nil/mod.rs | 8 +- .../ssz_static/sync_aggregate/ssz_one/mod.rs | 153 +++++++++++------- .../sync_aggregate/ssz_random/mod.rs | 153 +++++++++++------- .../sync_aggregate/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/sync_aggregate/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_max/mod.rs | 8 +- .../ssz_nil/mod.rs | 8 +- .../ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../sync_committee/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/sync_committee/ssz_max/mod.rs | 8 +- .../ssz_static/sync_committee/ssz_nil/mod.rs | 8 +- .../ssz_static/sync_committee/ssz_one/mod.rs | 153 +++++++++++------- .../sync_committee/ssz_random/mod.rs | 153 +++++++++++------- .../sync_committee/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/sync_committee/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_max/mod.rs | 8 +- .../ssz_nil/mod.rs | 8 +- .../ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../sync_committee_message/ssz_lengthy/mod.rs | 153 +++++++++++------- .../sync_committee_message/ssz_max/mod.rs | 8 +- .../sync_committee_message/ssz_nil/mod.rs | 8 +- .../sync_committee_message/ssz_one/mod.rs | 153 +++++++++++------- .../sync_committee_message/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../sync_committee_message/ssz_zero/mod.rs | 8 +- .../ssz_static/validator/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_max/mod.rs | 8 +- .../ssz_static/validator/ssz_nil/mod.rs | 8 +- .../ssz_static/validator/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_random/mod.rs | 153 +++++++++++------- .../validator/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_zero/mod.rs | 8 +- .../voluntary_exit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/voluntary_exit/ssz_max/mod.rs | 8 +- .../ssz_static/voluntary_exit/ssz_nil/mod.rs | 8 +- .../ssz_static/voluntary_exit/ssz_one/mod.rs | 153 +++++++++++------- .../voluntary_exit/ssz_random/mod.rs | 153 +++++++++++------- .../voluntary_exit/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/voluntary_exit/ssz_zero/mod.rs | 8 +- .../transition/core/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../eth_1_data_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../inactivity_updates/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../randao_mixes_reset/pyspec_tests/mod.rs | 1 - .../registry_updates/pyspec_tests/mod.rs | 1 - .../rewards_and_penalties/pyspec_tests/mod.rs | 1 - .../slashings/pyspec_tests/mod.rs | 1 - .../slashings_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../finality/finality/pyspec_tests/mod.rs | 1 - .../bellatrix/fork/fork/pyspec_tests/mod.rs | 1 - .../initialization/pyspec_tests/mod.rs | 1 - .../genesis/validity/pyspec_tests/mod.rs | 1 - .../attestation/pyspec_tests/mod.rs | 1 - .../attester_slashing/pyspec_tests/mod.rs | 1 - .../block_header/pyspec_tests/mod.rs | 1 - .../operations/deposit/pyspec_tests/mod.rs | 1 - .../execution_payload/pyspec_tests/mod.rs | 1 - .../proposer_slashing/pyspec_tests/mod.rs | 1 - .../sync_aggregate/pyspec_tests/mod.rs | 1 - .../voluntary_exit/pyspec_tests/mod.rs | 1 - .../random/random/pyspec_tests/mod.rs | 1 - .../rewards/basic/pyspec_tests/mod.rs | 1 - .../rewards/leak/pyspec_tests/mod.rs | 1 - .../rewards/random/pyspec_tests/mod.rs | 1 - .../sanity/blocks/pyspec_tests/mod.rs | 1 - .../sanity/slots/pyspec_tests/mod.rs | 1 - .../aggregate_and_proof/ssz_lengthy/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_max/mod.rs | 8 +- .../aggregate_and_proof/ssz_nil/mod.rs | 8 +- .../aggregate_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_zero/mod.rs | 8 +- .../ssz_static/attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_max/mod.rs | 8 +- .../ssz_static/attestation/ssz_nil/mod.rs | 8 +- .../ssz_static/attestation/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_random/mod.rs | 153 +++++++++++------- .../attestation/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_zero/mod.rs | 8 +- .../attestation_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_max/mod.rs | 8 +- .../attestation_data/ssz_nil/mod.rs | 8 +- .../attestation_data/ssz_one/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_random/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_zero/mod.rs | 8 +- .../attester_slashing/ssz_lengthy/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_max/mod.rs | 8 +- .../attester_slashing/ssz_nil/mod.rs | 8 +- .../attester_slashing/ssz_one/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_random/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_zero/mod.rs | 8 +- .../beacon_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_max/mod.rs | 8 +- .../ssz_static/beacon_block/ssz_nil/mod.rs | 8 +- .../ssz_static/beacon_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_zero/mod.rs | 8 +- .../beacon_block_body/ssz_lengthy/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_max/mod.rs | 8 +- .../beacon_block_body/ssz_nil/mod.rs | 8 +- .../beacon_block_body/ssz_one/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_zero/mod.rs | 8 +- .../beacon_block_header/ssz_lengthy/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_max/mod.rs | 8 +- .../beacon_block_header/ssz_nil/mod.rs | 8 +- .../beacon_block_header/ssz_one/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_zero/mod.rs | 8 +- .../beacon_state/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_max/mod.rs | 8 +- .../ssz_static/beacon_state/ssz_nil/mod.rs | 8 +- .../ssz_static/beacon_state/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_state/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_zero/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_max/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_nil/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_random/mod.rs | 153 +++++++++++------- .../checkpoint/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_zero/mod.rs | 8 +- .../contribution_and_proof/ssz_lengthy/mod.rs | 153 +++++++++++------- .../contribution_and_proof/ssz_max/mod.rs | 8 +- .../contribution_and_proof/ssz_nil/mod.rs | 8 +- .../contribution_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../contribution_and_proof/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../contribution_and_proof/ssz_zero/mod.rs | 8 +- .../ssz_static/deposit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit/ssz_max/mod.rs | 8 +- .../ssz_static/deposit/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/deposit/ssz_random/mod.rs | 153 +++++++++++------- .../deposit/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/deposit/ssz_zero/mod.rs | 8 +- .../deposit_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_max/mod.rs | 8 +- .../ssz_static/deposit_data/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_random/mod.rs | 153 +++++++++++------- .../deposit_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_zero/mod.rs | 8 +- .../deposit_message/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_message/ssz_max/mod.rs | 8 +- .../ssz_static/deposit_message/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit_message/ssz_one/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_random/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_zero/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_max/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_nil/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_random/mod.rs | 153 +++++++++++------- .../eth_1_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_zero/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_max/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_nil/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_random/mod.rs | 153 +++++++++++------- .../eth_1_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_zero/mod.rs | 8 +- .../execution_payload/ssz_lengthy/mod.rs | 153 +++++++++++------- .../execution_payload/ssz_max/mod.rs | 8 +- .../execution_payload/ssz_nil/mod.rs | 8 +- .../execution_payload/ssz_one/mod.rs | 153 +++++++++++------- .../execution_payload/ssz_random/mod.rs | 153 +++++++++++------- .../execution_payload/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../execution_payload/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../execution_payload_header/ssz_max/mod.rs | 8 +- .../execution_payload_header/ssz_nil/mod.rs | 8 +- .../execution_payload_header/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../execution_payload_header/ssz_zero/mod.rs | 8 +- .../ssz_static/fork/ssz_lengthy/mod.rs | 123 +++++++------- .../bellatrix/ssz_static/fork/ssz_max/mod.rs | 7 +- .../bellatrix/ssz_static/fork/ssz_nil/mod.rs | 7 +- .../bellatrix/ssz_static/fork/ssz_one/mod.rs | 123 +++++++------- .../ssz_static/fork/ssz_random/mod.rs | 123 +++++++------- .../ssz_static/fork/ssz_random_chaos/mod.rs | 123 +++++++------- .../bellatrix/ssz_static/fork/ssz_zero/mod.rs | 7 +- .../ssz_static/fork_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_max/mod.rs | 8 +- .../ssz_static/fork_data/ssz_nil/mod.rs | 8 +- .../ssz_static/fork_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_random/mod.rs | 153 +++++++++++------- .../fork_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_zero/mod.rs | 8 +- .../historical_batch/ssz_lengthy/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_max/mod.rs | 8 +- .../historical_batch/ssz_nil/mod.rs | 8 +- .../historical_batch/ssz_one/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_random/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_zero/mod.rs | 8 +- .../indexed_attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_max/mod.rs | 8 +- .../indexed_attestation/ssz_nil/mod.rs | 8 +- .../indexed_attestation/ssz_one/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_zero/mod.rs | 8 +- .../light_client_update/ssz_lengthy/mod.rs | 153 +++++++++++------- .../light_client_update/ssz_max/mod.rs | 8 +- .../light_client_update/ssz_nil/mod.rs | 8 +- .../light_client_update/ssz_one/mod.rs | 153 +++++++++++------- .../light_client_update/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../light_client_update/ssz_zero/mod.rs | 8 +- .../pending_attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_max/mod.rs | 8 +- .../pending_attestation/ssz_nil/mod.rs | 8 +- .../pending_attestation/ssz_one/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_zero/mod.rs | 8 +- .../ssz_static/pow_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/pow_block/ssz_max/mod.rs | 8 +- .../ssz_static/pow_block/ssz_nil/mod.rs | 8 +- .../ssz_static/pow_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/pow_block/ssz_random/mod.rs | 153 +++++++++++------- .../pow_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/pow_block/ssz_zero/mod.rs | 8 +- .../proposer_slashing/ssz_lengthy/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_max/mod.rs | 8 +- .../proposer_slashing/ssz_nil/mod.rs | 8 +- .../proposer_slashing/ssz_one/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_random/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_aggregate_and_proof/ssz_max/mod.rs | 8 +- .../signed_aggregate_and_proof/ssz_nil/mod.rs | 8 +- .../signed_aggregate_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../signed_beacon_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_max/mod.rs | 8 +- .../signed_beacon_block/ssz_nil/mod.rs | 8 +- .../signed_beacon_block/ssz_one/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_beacon_block_header/ssz_max/mod.rs | 8 +- .../signed_beacon_block_header/ssz_nil/mod.rs | 8 +- .../signed_beacon_block_header/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_max/mod.rs | 8 +- .../ssz_nil/mod.rs | 8 +- .../ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../signed_voluntary_exit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_max/mod.rs | 8 +- .../signed_voluntary_exit/ssz_nil/mod.rs | 8 +- .../signed_voluntary_exit/ssz_one/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_zero/mod.rs | 8 +- .../signing_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_max/mod.rs | 8 +- .../ssz_static/signing_data/ssz_nil/mod.rs | 8 +- .../ssz_static/signing_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_random/mod.rs | 153 +++++++++++------- .../signing_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_zero/mod.rs | 8 +- .../sync_aggregate/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/sync_aggregate/ssz_max/mod.rs | 8 +- .../ssz_static/sync_aggregate/ssz_nil/mod.rs | 8 +- .../ssz_static/sync_aggregate/ssz_one/mod.rs | 153 +++++++++++------- .../sync_aggregate/ssz_random/mod.rs | 153 +++++++++++------- .../sync_aggregate/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/sync_aggregate/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_max/mod.rs | 8 +- .../ssz_nil/mod.rs | 8 +- .../ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../sync_committee/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/sync_committee/ssz_max/mod.rs | 8 +- .../ssz_static/sync_committee/ssz_nil/mod.rs | 8 +- .../ssz_static/sync_committee/ssz_one/mod.rs | 153 +++++++++++------- .../sync_committee/ssz_random/mod.rs | 153 +++++++++++------- .../sync_committee/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/sync_committee/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_max/mod.rs | 8 +- .../ssz_nil/mod.rs | 8 +- .../ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../sync_committee_message/ssz_lengthy/mod.rs | 153 +++++++++++------- .../sync_committee_message/ssz_max/mod.rs | 8 +- .../sync_committee_message/ssz_nil/mod.rs | 8 +- .../sync_committee_message/ssz_one/mod.rs | 153 +++++++++++------- .../sync_committee_message/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../sync_committee_message/ssz_zero/mod.rs | 8 +- .../ssz_static/validator/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_max/mod.rs | 8 +- .../ssz_static/validator/ssz_nil/mod.rs | 8 +- .../ssz_static/validator/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_random/mod.rs | 153 +++++++++++------- .../validator/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_zero/mod.rs | 8 +- .../voluntary_exit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/voluntary_exit/ssz_max/mod.rs | 8 +- .../ssz_static/voluntary_exit/ssz_nil/mod.rs | 8 +- .../ssz_static/voluntary_exit/ssz_one/mod.rs | 153 +++++++++++------- .../voluntary_exit/ssz_random/mod.rs | 153 +++++++++++------- .../voluntary_exit/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/voluntary_exit/ssz_zero/mod.rs | 8 +- .../transition/core/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../eth_1_data_reset/pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../pyspec_tests/mod.rs | 1 - .../randao_mixes_reset/pyspec_tests/mod.rs | 1 - .../registry_updates/pyspec_tests/mod.rs | 1 - .../rewards_and_penalties/pyspec_tests/mod.rs | 1 - .../slashings/pyspec_tests/mod.rs | 1 - .../slashings_reset/pyspec_tests/mod.rs | 1 - .../finality/finality/pyspec_tests/mod.rs | 1 - .../initialization/pyspec_tests/mod.rs | 1 - .../genesis/validity/pyspec_tests/mod.rs | 1 - .../attestation/pyspec_tests/mod.rs | 1 - .../attester_slashing/pyspec_tests/mod.rs | 1 - .../block_header/pyspec_tests/mod.rs | 1 - .../operations/deposit/pyspec_tests/mod.rs | 1 - .../proposer_slashing/pyspec_tests/mod.rs | 1 - .../voluntary_exit/pyspec_tests/mod.rs | 1 - .../phase0/random/random/pyspec_tests/mod.rs | 1 - .../phase0/rewards/basic/pyspec_tests/mod.rs | 1 - .../phase0/rewards/leak/pyspec_tests/mod.rs | 1 - .../phase0/rewards/random/pyspec_tests/mod.rs | 1 - .../phase0/sanity/blocks/pyspec_tests/mod.rs | 1 - .../phase0/sanity/slots/pyspec_tests/mod.rs | 1 - .../aggregate_and_proof/ssz_lengthy/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_max/mod.rs | 8 +- .../aggregate_and_proof/ssz_nil/mod.rs | 8 +- .../aggregate_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../aggregate_and_proof/ssz_zero/mod.rs | 8 +- .../ssz_static/attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_max/mod.rs | 8 +- .../ssz_static/attestation/ssz_nil/mod.rs | 8 +- .../ssz_static/attestation/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_random/mod.rs | 153 +++++++++++------- .../attestation/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/attestation/ssz_zero/mod.rs | 8 +- .../attestation_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_max/mod.rs | 8 +- .../attestation_data/ssz_nil/mod.rs | 8 +- .../attestation_data/ssz_one/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_random/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../attestation_data/ssz_zero/mod.rs | 8 +- .../attester_slashing/ssz_lengthy/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_max/mod.rs | 8 +- .../attester_slashing/ssz_nil/mod.rs | 8 +- .../attester_slashing/ssz_one/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_random/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../attester_slashing/ssz_zero/mod.rs | 8 +- .../beacon_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_max/mod.rs | 8 +- .../ssz_static/beacon_block/ssz_nil/mod.rs | 8 +- .../ssz_static/beacon_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_block/ssz_zero/mod.rs | 8 +- .../beacon_block_body/ssz_lengthy/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_max/mod.rs | 8 +- .../beacon_block_body/ssz_nil/mod.rs | 8 +- .../beacon_block_body/ssz_one/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../beacon_block_body/ssz_zero/mod.rs | 8 +- .../beacon_block_header/ssz_lengthy/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_max/mod.rs | 8 +- .../beacon_block_header/ssz_nil/mod.rs | 8 +- .../beacon_block_header/ssz_one/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../beacon_block_header/ssz_zero/mod.rs | 8 +- .../beacon_state/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_max/mod.rs | 8 +- .../ssz_static/beacon_state/ssz_nil/mod.rs | 8 +- .../ssz_static/beacon_state/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_random/mod.rs | 153 +++++++++++------- .../beacon_state/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/beacon_state/ssz_zero/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_max/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_nil/mod.rs | 8 +- .../ssz_static/checkpoint/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_random/mod.rs | 153 +++++++++++------- .../checkpoint/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/checkpoint/ssz_zero/mod.rs | 8 +- .../ssz_static/deposit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../phase0/ssz_static/deposit/ssz_max/mod.rs | 8 +- .../phase0/ssz_static/deposit/ssz_nil/mod.rs | 8 +- .../phase0/ssz_static/deposit/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/deposit/ssz_random/mod.rs | 153 +++++++++++------- .../deposit/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../phase0/ssz_static/deposit/ssz_zero/mod.rs | 8 +- .../deposit_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_max/mod.rs | 8 +- .../ssz_static/deposit_data/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_random/mod.rs | 153 +++++++++++------- .../deposit_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_data/ssz_zero/mod.rs | 8 +- .../deposit_message/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/deposit_message/ssz_max/mod.rs | 8 +- .../ssz_static/deposit_message/ssz_nil/mod.rs | 8 +- .../ssz_static/deposit_message/ssz_one/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_random/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../deposit_message/ssz_zero/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_max/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_nil/mod.rs | 8 +- .../ssz_static/eth_1_block/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_random/mod.rs | 153 +++++++++++------- .../eth_1_block/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_block/ssz_zero/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_max/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_nil/mod.rs | 8 +- .../ssz_static/eth_1_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_random/mod.rs | 153 +++++++++++------- .../eth_1_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/eth_1_data/ssz_zero/mod.rs | 8 +- .../phase0/ssz_static/fork/ssz_lengthy/mod.rs | 123 +++++++------- .../phase0/ssz_static/fork/ssz_max/mod.rs | 7 +- .../phase0/ssz_static/fork/ssz_nil/mod.rs | 7 +- .../phase0/ssz_static/fork/ssz_one/mod.rs | 123 +++++++------- .../phase0/ssz_static/fork/ssz_random/mod.rs | 123 +++++++------- .../ssz_static/fork/ssz_random_chaos/mod.rs | 123 +++++++------- .../phase0/ssz_static/fork/ssz_zero/mod.rs | 7 +- .../ssz_static/fork_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_max/mod.rs | 8 +- .../ssz_static/fork_data/ssz_nil/mod.rs | 8 +- .../ssz_static/fork_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_random/mod.rs | 153 +++++++++++------- .../fork_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/fork_data/ssz_zero/mod.rs | 8 +- .../historical_batch/ssz_lengthy/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_max/mod.rs | 8 +- .../historical_batch/ssz_nil/mod.rs | 8 +- .../historical_batch/ssz_one/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_random/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../historical_batch/ssz_zero/mod.rs | 8 +- .../indexed_attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_max/mod.rs | 8 +- .../indexed_attestation/ssz_nil/mod.rs | 8 +- .../indexed_attestation/ssz_one/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../indexed_attestation/ssz_zero/mod.rs | 8 +- .../pending_attestation/ssz_lengthy/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_max/mod.rs | 8 +- .../pending_attestation/ssz_nil/mod.rs | 8 +- .../pending_attestation/ssz_one/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../pending_attestation/ssz_zero/mod.rs | 8 +- .../proposer_slashing/ssz_lengthy/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_max/mod.rs | 8 +- .../proposer_slashing/ssz_nil/mod.rs | 8 +- .../proposer_slashing/ssz_one/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_random/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../proposer_slashing/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_aggregate_and_proof/ssz_max/mod.rs | 8 +- .../signed_aggregate_and_proof/ssz_nil/mod.rs | 8 +- .../signed_aggregate_and_proof/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../signed_beacon_block/ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_max/mod.rs | 8 +- .../signed_beacon_block/ssz_nil/mod.rs | 8 +- .../signed_beacon_block/ssz_one/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../signed_beacon_block/ssz_zero/mod.rs | 8 +- .../ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_beacon_block_header/ssz_max/mod.rs | 8 +- .../signed_beacon_block_header/ssz_nil/mod.rs | 8 +- .../signed_beacon_block_header/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_zero/mod.rs | 8 +- .../signed_voluntary_exit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_max/mod.rs | 8 +- .../signed_voluntary_exit/ssz_nil/mod.rs | 8 +- .../signed_voluntary_exit/ssz_one/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_random/mod.rs | 153 +++++++++++------- .../ssz_random_chaos/mod.rs | 153 +++++++++++------- .../signed_voluntary_exit/ssz_zero/mod.rs | 8 +- .../signing_data/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_max/mod.rs | 8 +- .../ssz_static/signing_data/ssz_nil/mod.rs | 8 +- .../ssz_static/signing_data/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_random/mod.rs | 153 +++++++++++------- .../signing_data/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/signing_data/ssz_zero/mod.rs | 8 +- .../ssz_static/validator/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_max/mod.rs | 8 +- .../ssz_static/validator/ssz_nil/mod.rs | 8 +- .../ssz_static/validator/ssz_one/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_random/mod.rs | 153 +++++++++++------- .../validator/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/validator/ssz_zero/mod.rs | 8 +- .../voluntary_exit/ssz_lengthy/mod.rs | 153 +++++++++++------- .../ssz_static/voluntary_exit/ssz_max/mod.rs | 8 +- .../ssz_static/voluntary_exit/ssz_nil/mod.rs | 8 +- .../ssz_static/voluntary_exit/ssz_one/mod.rs | 153 +++++++++++------- .../voluntary_exit/ssz_random/mod.rs | 153 +++++++++++------- .../voluntary_exit/ssz_random_chaos/mod.rs | 153 +++++++++++------- .../ssz_static/voluntary_exit/ssz_zero/mod.rs | 8 +- .../tests/spec_test_runners/rewards/mod.rs | 3 +- spec-gen/src/generator.rs | 12 +- test-gen/src/main.rs | 36 +++-- test-gen/src/template.rs | 152 ++++++++--------- 1034 files changed, 38994 insertions(+), 27557 deletions(-) diff --git a/ethereum-consensus/examples/state_transition_across_multiple_forks.rs b/ethereum-consensus/examples/state_transition_across_multiple_forks.rs index 09f7e52e9..e12d3ef43 100644 --- a/ethereum-consensus/examples/state_transition_across_multiple_forks.rs +++ b/ethereum-consensus/examples/state_transition_across_multiple_forks.rs @@ -2,9 +2,9 @@ use ethereum_consensus::{ altair::mainnet as altair, bellatrix::mainnet as bellatrix, phase0::mainnet as phase0, + ssz::prelude::*, state_transition::mainnet::{Context, ExecutionEngine, Executor}, }; -use ssz_rs::prelude::*; use std::error::Error; fn main() -> std::result::Result<(), Box> { diff --git a/ethereum-consensus/src/altair/beacon_block.rs b/ethereum-consensus/src/altair/beacon_block.rs index d42c57313..2999df6da 100644 --- a/ethereum-consensus/src/altair/beacon_block.rs +++ b/ethereum-consensus/src/altair/beacon_block.rs @@ -4,8 +4,8 @@ use crate::{ SignedVoluntaryExit, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/altair/beacon_state.rs b/ethereum-consensus/src/altair/beacon_state.rs index cf975bb2e..2f0c9d0d6 100644 --- a/ethereum-consensus/src/altair/beacon_state.rs +++ b/ethereum-consensus/src/altair/beacon_state.rs @@ -4,8 +4,8 @@ use crate::{ JUSTIFICATION_BITS_LENGTH, }, primitives::{Bytes32, Gwei, ParticipationFlags, Root, Slot}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/altair/block_processing.rs b/ethereum-consensus/src/altair/block_processing.rs index 4b04da299..6dbba136c 100644 --- a/ethereum-consensus/src/altair/block_processing.rs +++ b/ethereum-consensus/src/altair/block_processing.rs @@ -23,12 +23,12 @@ use crate::{ domains::DomainType, primitives::{BlsPublicKey, ParticipationFlags, ValidatorIndex}, signing::compute_signing_root, + ssz::prelude::*, state_transition::{ invalid_operation_error, Context, InvalidAttestation, InvalidDeposit, InvalidOperation, InvalidSyncAggregate, Result, }, }; -use ssz_rs::prelude::*; use std::{ collections::{HashMap, HashSet}, iter::zip, diff --git a/ethereum-consensus/src/altair/fork.rs b/ethereum-consensus/src/altair/fork.rs index f8b77108f..80309fb60 100644 --- a/ethereum-consensus/src/altair/fork.rs +++ b/ethereum-consensus/src/altair/fork.rs @@ -8,7 +8,6 @@ use crate::{ phase0, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; fn translate_participation< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/altair/genesis.rs b/ethereum-consensus/src/altair/genesis.rs index c5e1cf07f..6f9332130 100644 --- a/ethereum-consensus/src/altair/genesis.rs +++ b/ethereum-consensus/src/altair/genesis.rs @@ -5,9 +5,9 @@ use crate::{ Deposit, DepositData, Eth1Data, Fork, DEPOSIT_DATA_LIST_BOUND, }, primitives::{Gwei, Hash32, GENESIS_EPOCH}, + ssz::prelude::*, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; pub fn initialize_beacon_state_from_eth1< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/altair/helpers.rs b/ethereum-consensus/src/altair/helpers.rs index ca2aaf50c..f89102bf7 100644 --- a/ethereum-consensus/src/altair/helpers.rs +++ b/ethereum-consensus/src/altair/helpers.rs @@ -16,12 +16,12 @@ use crate::{ crypto::{eth_aggregate_public_keys, hash}, domains::DomainType, primitives::{BlsPublicKey, Epoch, Gwei, ParticipationFlags, ValidatorIndex}, + ssz::prelude::Vector, state_transition::{ invalid_operation_error, Context, Error, InvalidAttestation, InvalidOperation, Result, }, }; use integer_sqrt::IntegerSquareRoot; -use ssz_rs::Vector; use std::collections::HashSet; // Return a new ``ParticipationFlags`` adding ``flag_index`` to ``flags`` diff --git a/ethereum-consensus/src/altair/light_client.rs b/ethereum-consensus/src/altair/light_client.rs index 1a66a8125..00f3d9cf7 100644 --- a/ethereum-consensus/src/altair/light_client.rs +++ b/ethereum-consensus/src/altair/light_client.rs @@ -4,8 +4,8 @@ use crate::{ BeaconBlockHeader, }, primitives::{Bytes32, Slot}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; pub const FINALIZED_ROOT_INDEX: usize = 105; pub const FINALIZED_ROOT_INDEX_FLOOR_LOG_2: usize = 6; diff --git a/ethereum-consensus/src/altair/networking.rs b/ethereum-consensus/src/altair/networking.rs index 52de40d63..b68ee953e 100644 --- a/ethereum-consensus/src/altair/networking.rs +++ b/ethereum-consensus/src/altair/networking.rs @@ -1,7 +1,7 @@ use crate::{ altair::constants::SYNC_COMMITTEE_SUBNET_COUNT, phase0::networking::ATTESTATION_SUBNET_COUNT, + ssz::prelude::Bitvector, }; -use ssz_rs::prelude::Bitvector; #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct MetaData { diff --git a/ethereum-consensus/src/altair/spec/mod.rs b/ethereum-consensus/src/altair/spec/mod.rs index bc82110b8..b392ab7ef 100644 --- a/ethereum-consensus/src/altair/spec/mod.rs +++ b/ethereum-consensus/src/altair/spec/mod.rs @@ -58,9 +58,8 @@ pub use crate::{ }; use crate::{ crypto::{fast_aggregate_verify, hash, verify_signature}, - ssz::*, + ssz::prelude::*, }; -use ssz_rs::prelude::*; use std::{cmp, collections::HashSet}; pub fn process_proposer_slashing< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/altair/sync.rs b/ethereum-consensus/src/altair/sync.rs index 8440d853e..fd20718b5 100644 --- a/ethereum-consensus/src/altair/sync.rs +++ b/ethereum-consensus/src/altair/sync.rs @@ -1,5 +1,7 @@ -use crate::primitives::{BlsPublicKey, BlsSignature}; -use ssz_rs::prelude::*; +use crate::{ + primitives::{BlsPublicKey, BlsSignature}, + ssz::prelude::*, +}; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/altair/validator.rs b/ethereum-consensus/src/altair/validator.rs index d19ac5914..5e5cc750b 100644 --- a/ethereum-consensus/src/altair/validator.rs +++ b/ethereum-consensus/src/altair/validator.rs @@ -1,5 +1,7 @@ -use crate::primitives::{BlsSignature, Root, Slot, ValidatorIndex}; -use ssz_rs::prelude::*; +use crate::{ + primitives::{BlsSignature, Root, Slot, ValidatorIndex}, + ssz::prelude::*, +}; #[derive(Debug, Default, Clone, SimpleSerialize)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/bellatrix/beacon_block.rs b/ethereum-consensus/src/bellatrix/beacon_block.rs index c9df7e1a5..b8fba7f8c 100644 --- a/ethereum-consensus/src/bellatrix/beacon_block.rs +++ b/ethereum-consensus/src/bellatrix/beacon_block.rs @@ -4,8 +4,8 @@ use crate::{ SignedVoluntaryExit, SyncAggregate, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/bellatrix/beacon_state.rs b/ethereum-consensus/src/bellatrix/beacon_state.rs index 23027fd0f..8e34feb81 100644 --- a/ethereum-consensus/src/bellatrix/beacon_state.rs +++ b/ethereum-consensus/src/bellatrix/beacon_state.rs @@ -4,8 +4,8 @@ use crate::{ Validator, JUSTIFICATION_BITS_LENGTH, }, primitives::{Bytes32, Gwei, ParticipationFlags, Root, Slot}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/bellatrix/blinded_beacon_block.rs b/ethereum-consensus/src/bellatrix/blinded_beacon_block.rs index ddd0af694..8ec374ee3 100644 --- a/ethereum-consensus/src/bellatrix/blinded_beacon_block.rs +++ b/ethereum-consensus/src/bellatrix/blinded_beacon_block.rs @@ -4,8 +4,8 @@ use crate::{ SignedVoluntaryExit, SyncAggregate, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/bellatrix/block_processing.rs b/ethereum-consensus/src/bellatrix/block_processing.rs index 8c502a220..45da4a6ac 100644 --- a/ethereum-consensus/src/bellatrix/block_processing.rs +++ b/ethereum-consensus/src/bellatrix/block_processing.rs @@ -5,9 +5,9 @@ use crate::{ process_randao, process_sync_aggregate, BeaconBlock, BeaconState, ExecutionEngine, ExecutionPayload, ExecutionPayloadHeader, NewPayloadRequest, }, + ssz::prelude::*, state_transition::{invalid_operation_error, Context, InvalidExecutionPayload, Result}, }; -use ssz_rs::prelude::*; pub fn process_execution_payload< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/bellatrix/execution_engine.rs b/ethereum-consensus/src/bellatrix/execution_engine.rs index 1530974eb..132710184 100644 --- a/ethereum-consensus/src/bellatrix/execution_engine.rs +++ b/ethereum-consensus/src/bellatrix/execution_engine.rs @@ -2,7 +2,6 @@ use crate::{ bellatrix::execution_payload::ExecutionPayload, state_transition::{self, ExecutionEngineError, Result}, }; -use ssz_rs::prelude::*; pub struct NewPayloadRequest< 'a, diff --git a/ethereum-consensus/src/bellatrix/execution_payload.rs b/ethereum-consensus/src/bellatrix/execution_payload.rs index 4c14f79b4..9dd595f8d 100644 --- a/ethereum-consensus/src/bellatrix/execution_payload.rs +++ b/ethereum-consensus/src/bellatrix/execution_payload.rs @@ -1,9 +1,8 @@ use crate::{ primitives::{Bytes32, ExecutionAddress, Hash32, Root, U256}, - ssz::{ByteList, ByteVector}, + ssz::prelude::*, state_transition::Error, }; -use ssz_rs::prelude::*; pub type Transaction = ByteList; diff --git a/ethereum-consensus/src/bellatrix/fork.rs b/ethereum-consensus/src/bellatrix/fork.rs index 3353d68ce..97673e5d0 100644 --- a/ethereum-consensus/src/bellatrix/fork.rs +++ b/ethereum-consensus/src/bellatrix/fork.rs @@ -3,7 +3,6 @@ use crate::{ bellatrix::{BeaconState, Fork}, state_transition::Context, }; -use ssz_rs::prelude::*; pub fn upgrade_to_bellatrix< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/bellatrix/fork_choice.rs b/ethereum-consensus/src/bellatrix/fork_choice.rs index 867c52be9..815199aaa 100644 --- a/ethereum-consensus/src/bellatrix/fork_choice.rs +++ b/ethereum-consensus/src/bellatrix/fork_choice.rs @@ -1,5 +1,4 @@ -use crate::primitives::Hash32; -use ssz_rs::prelude::*; +use crate::{primitives::Hash32, ssz::prelude::*}; #[derive(Default, Debug, SimpleSerialize, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/bellatrix/genesis.rs b/ethereum-consensus/src/bellatrix/genesis.rs index f2802e99c..d57f8fb07 100644 --- a/ethereum-consensus/src/bellatrix/genesis.rs +++ b/ethereum-consensus/src/bellatrix/genesis.rs @@ -4,9 +4,9 @@ use crate::{ Deposit, DepositData, Eth1Data, ExecutionPayloadHeader, Fork, DEPOSIT_DATA_LIST_BOUND, }, primitives::{Gwei, Hash32, GENESIS_EPOCH}, + ssz::prelude::*, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; pub fn initialize_beacon_state_from_eth1< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/bellatrix/spec/mod.rs b/ethereum-consensus/src/bellatrix/spec/mod.rs index 684f63719..db79131e8 100644 --- a/ethereum-consensus/src/bellatrix/spec/mod.rs +++ b/ethereum-consensus/src/bellatrix/spec/mod.rs @@ -62,10 +62,9 @@ use crate::{ eth_aggregate_public_keys, eth_fast_aggregate_verify, fast_aggregate_verify, hash, verify_signature, }, - ssz::*, + ssz::prelude::*, }; use integer_sqrt::IntegerSquareRoot; -use ssz_rs::prelude::*; use std::{ cmp, collections::{HashMap, HashSet}, diff --git a/ethereum-consensus/src/bellatrix/state_transition.rs b/ethereum-consensus/src/bellatrix/state_transition.rs index 5238be77f..df46b7803 100644 --- a/ethereum-consensus/src/bellatrix/state_transition.rs +++ b/ethereum-consensus/src/bellatrix/state_transition.rs @@ -3,9 +3,9 @@ use crate::{ process_block, process_slots, verify_block_signature, BeaconState, ExecutionEngine, SignedBeaconBlock, }, + ssz::prelude::Merkleized, state_transition::{Context, Error, Result, Validation}, }; -use ssz_rs::prelude::Merkleized; // `state_transition_block_in_slot` is separated out // to facilitate upgrades across forks which take place diff --git a/ethereum-consensus/src/builder/mod.rs b/ethereum-consensus/src/builder/mod.rs index 3f8b82ee4..ead49a623 100644 --- a/ethereum-consensus/src/builder/mod.rs +++ b/ethereum-consensus/src/builder/mod.rs @@ -1,9 +1,9 @@ use crate::{ phase0::compute_domain, primitives::{BlsPublicKey, BlsSignature, Domain, DomainType, ExecutionAddress}, + ssz::prelude::*, state_transition::{Context, Error}, }; -use ssz_rs::prelude::*; #[derive(Debug, Clone, Default, SimpleSerialize)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/capella/beacon_block.rs b/ethereum-consensus/src/capella/beacon_block.rs index e9d3120f0..441f686ff 100644 --- a/ethereum-consensus/src/capella/beacon_block.rs +++ b/ethereum-consensus/src/capella/beacon_block.rs @@ -5,8 +5,8 @@ use crate::{ Attestation, AttesterSlashing, Deposit, Eth1Data, ProposerSlashing, SignedVoluntaryExit, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/capella/beacon_state.rs b/ethereum-consensus/src/capella/beacon_state.rs index 82bc48131..8af0f9338 100644 --- a/ethereum-consensus/src/capella/beacon_state.rs +++ b/ethereum-consensus/src/capella/beacon_state.rs @@ -4,8 +4,8 @@ use crate::{ capella::ExecutionPayloadHeader, phase0::{BeaconBlockHeader, Checkpoint, Eth1Data, Fork, Validator, JUSTIFICATION_BITS_LENGTH}, primitives::{Bytes32, Gwei, ParticipationFlags, Root, Slot, ValidatorIndex, WithdrawalIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/capella/blinded_beacon_block.rs b/ethereum-consensus/src/capella/blinded_beacon_block.rs index 42e227776..6a1dd0eef 100644 --- a/ethereum-consensus/src/capella/blinded_beacon_block.rs +++ b/ethereum-consensus/src/capella/blinded_beacon_block.rs @@ -5,8 +5,8 @@ use crate::{ Attestation, AttesterSlashing, Deposit, Eth1Data, ProposerSlashing, SignedVoluntaryExit, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/capella/block_processing.rs b/ethereum-consensus/src/capella/block_processing.rs index 744bcc2fe..0f6fb304a 100644 --- a/ethereum-consensus/src/capella/block_processing.rs +++ b/ethereum-consensus/src/capella/block_processing.rs @@ -6,12 +6,12 @@ use crate::{ BeaconBlock, BeaconBlockBody, BeaconState, ExecutionEngine, ExecutionPayload, ExecutionPayloadHeader, NewPayloadRequest, SignedBlsToExecutionChange, }, + ssz::prelude::*, state_transition::{ invalid_operation_error, Context, InvalidDeposit, InvalidExecutionPayload, InvalidOperation, Result, }, }; -use ssz_rs::prelude::*; pub fn process_bls_to_execution_change< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/capella/bls_to_execution_change.rs b/ethereum-consensus/src/capella/bls_to_execution_change.rs index 10f094ab8..273543676 100644 --- a/ethereum-consensus/src/capella/bls_to_execution_change.rs +++ b/ethereum-consensus/src/capella/bls_to_execution_change.rs @@ -1,5 +1,7 @@ -use crate::primitives::{BlsPublicKey, BlsSignature, ExecutionAddress, ValidatorIndex}; -use ssz_rs::prelude::*; +use crate::{ + primitives::{BlsPublicKey, BlsSignature, ExecutionAddress, ValidatorIndex}, + ssz::prelude::*, +}; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/capella/epoch_processing.rs b/ethereum-consensus/src/capella/epoch_processing.rs index bb50ffb17..2ad0b6d7d 100644 --- a/ethereum-consensus/src/capella/epoch_processing.rs +++ b/ethereum-consensus/src/capella/epoch_processing.rs @@ -6,9 +6,9 @@ use crate::{ process_rewards_and_penalties, process_slashings, process_slashings_reset, process_sync_committee_updates, BeaconState, HistoricalSummary, }, + ssz::prelude::*, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; pub fn process_historical_summaries_update< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/capella/execution_engine.rs b/ethereum-consensus/src/capella/execution_engine.rs index 85dca5c3e..ea0ecd1d7 100644 --- a/ethereum-consensus/src/capella/execution_engine.rs +++ b/ethereum-consensus/src/capella/execution_engine.rs @@ -2,7 +2,6 @@ use crate::{ capella::execution_payload::ExecutionPayload, state_transition::{ExecutionEngineError, Result}, }; -use ssz_rs::prelude::*; pub struct NewPayloadRequest< 'a, diff --git a/ethereum-consensus/src/capella/execution_payload.rs b/ethereum-consensus/src/capella/execution_payload.rs index 46fa4c028..e1687e348 100644 --- a/ethereum-consensus/src/capella/execution_payload.rs +++ b/ethereum-consensus/src/capella/execution_payload.rs @@ -2,10 +2,9 @@ use crate::{ bellatrix::Transaction, capella::withdrawal::Withdrawal, primitives::{Bytes32, ExecutionAddress, Hash32, Root, U256}, - ssz::{ByteList, ByteVector}, + ssz::prelude::*, state_transition::Error, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/capella/fork.rs b/ethereum-consensus/src/capella/fork.rs index 95b9582ed..b584ad59b 100644 --- a/ethereum-consensus/src/capella/fork.rs +++ b/ethereum-consensus/src/capella/fork.rs @@ -3,7 +3,6 @@ use crate::{ capella::{BeaconState, ExecutionPayloadHeader, Fork}, state_transition::Context, }; -use ssz_rs::prelude::*; pub fn upgrade_to_capella< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/capella/genesis.rs b/ethereum-consensus/src/capella/genesis.rs index ce7f5d911..e2adaeac2 100644 --- a/ethereum-consensus/src/capella/genesis.rs +++ b/ethereum-consensus/src/capella/genesis.rs @@ -4,9 +4,9 @@ use crate::{ Deposit, DepositData, Eth1Data, ExecutionPayloadHeader, Fork, DEPOSIT_DATA_LIST_BOUND, }, primitives::{Gwei, Hash32, GENESIS_EPOCH}, + ssz::prelude::*, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; pub fn initialize_beacon_state_from_eth1< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/capella/spec/mod.rs b/ethereum-consensus/src/capella/spec/mod.rs index 11dfa98b8..1d37e5a7c 100644 --- a/ethereum-consensus/src/capella/spec/mod.rs +++ b/ethereum-consensus/src/capella/spec/mod.rs @@ -66,10 +66,9 @@ use crate::{ eth_aggregate_public_keys, eth_fast_aggregate_verify, fast_aggregate_verify, hash, verify_signature, }, - ssz::*, + ssz::prelude::*, }; use integer_sqrt::IntegerSquareRoot; -use ssz_rs::prelude::*; use std::{ cmp, collections::{HashMap, HashSet}, diff --git a/ethereum-consensus/src/capella/withdrawal.rs b/ethereum-consensus/src/capella/withdrawal.rs index eb915e6cd..eab6228b8 100644 --- a/ethereum-consensus/src/capella/withdrawal.rs +++ b/ethereum-consensus/src/capella/withdrawal.rs @@ -1,5 +1,7 @@ -use crate::primitives::{ExecutionAddress, Gwei, ValidatorIndex, WithdrawalIndex}; -use ssz_rs::prelude::*; +use crate::{ + primitives::{ExecutionAddress, Gwei, ValidatorIndex, WithdrawalIndex}, + ssz::prelude::*, +}; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/crypto.rs b/ethereum-consensus/src/crypto.rs index dcc24b330..de6245edf 100644 --- a/ethereum-consensus/src/crypto.rs +++ b/ethereum-consensus/src/crypto.rs @@ -1,9 +1,8 @@ #[cfg(feature = "serde")] use crate::serde::{try_bytes_from_hex_str, HexError}; -use crate::{primitives::Bytes32, ssz::ByteVector}; +use crate::{primitives::Bytes32, ssz::prelude::*}; use blst::{min_pk as bls_impl, BLST_ERROR}; use sha2::{digest::FixedOutput, Digest, Sha256}; -use ssz_rs::prelude::*; use std::{ fmt, ops::{Deref, DerefMut}, diff --git a/ethereum-consensus/src/deneb/beacon_block.rs b/ethereum-consensus/src/deneb/beacon_block.rs index 9a6f0d6fe..c251f6966 100644 --- a/ethereum-consensus/src/deneb/beacon_block.rs +++ b/ethereum-consensus/src/deneb/beacon_block.rs @@ -7,8 +7,8 @@ use crate::{ Attestation, AttesterSlashing, Deposit, Eth1Data, ProposerSlashing, SignedVoluntaryExit, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/deneb/beacon_state.rs b/ethereum-consensus/src/deneb/beacon_state.rs index db84d43dd..52135ef8e 100644 --- a/ethereum-consensus/src/deneb/beacon_state.rs +++ b/ethereum-consensus/src/deneb/beacon_state.rs @@ -4,8 +4,8 @@ use crate::{ deneb::ExecutionPayloadHeader, phase0::{BeaconBlockHeader, Checkpoint, Eth1Data, Fork, Validator, JUSTIFICATION_BITS_LENGTH}, primitives::{Bytes32, Gwei, ParticipationFlags, Root, Slot, ValidatorIndex, WithdrawalIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/deneb/blinded_beacon_block.rs b/ethereum-consensus/src/deneb/blinded_beacon_block.rs index d1968ad85..69fe40c36 100644 --- a/ethereum-consensus/src/deneb/blinded_beacon_block.rs +++ b/ethereum-consensus/src/deneb/blinded_beacon_block.rs @@ -7,8 +7,8 @@ use crate::{ Attestation, AttesterSlashing, Deposit, Eth1Data, ProposerSlashing, SignedVoluntaryExit, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/deneb/blinded_blob_sidecar.rs b/ethereum-consensus/src/deneb/blinded_blob_sidecar.rs index 23a8162a6..af00920cb 100644 --- a/ethereum-consensus/src/deneb/blinded_blob_sidecar.rs +++ b/ethereum-consensus/src/deneb/blinded_blob_sidecar.rs @@ -1,8 +1,8 @@ use crate::{ kzg::{KzgCommitment, KzgProof}, primitives::{BlobIndex, BlsSignature, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/deneb/blob_sidecar.rs b/ethereum-consensus/src/deneb/blob_sidecar.rs index 861973cf1..73249921e 100644 --- a/ethereum-consensus/src/deneb/blob_sidecar.rs +++ b/ethereum-consensus/src/deneb/blob_sidecar.rs @@ -1,9 +1,8 @@ use crate::{ kzg::{KzgCommitment, KzgProof}, primitives::{BlobIndex, BlsSignature, Root, Slot, ValidatorIndex}, - ssz::ByteVector, + ssz::prelude::*, }; -use ssz_rs::prelude::*; pub const BLOB_TX_TYPE: u8 = 3; pub const VERSIONED_HASH_VERSION_KZG: u8 = 1; diff --git a/ethereum-consensus/src/deneb/block_processing.rs b/ethereum-consensus/src/deneb/block_processing.rs index 5305bff5c..7c0d0caf0 100644 --- a/ethereum-consensus/src/deneb/block_processing.rs +++ b/ethereum-consensus/src/deneb/block_processing.rs @@ -14,12 +14,12 @@ use crate::{ domains::DomainType, primitives::FAR_FUTURE_EPOCH, signing::verify_signed_data, + ssz::prelude::*, state_transition::{ invalid_operation_error, Context, InvalidAttestation, InvalidExecutionPayload, InvalidOperation, InvalidVoluntaryExit, Result, }, }; -use ssz_rs::prelude::*; pub fn process_attestation< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/deneb/execution_engine.rs b/ethereum-consensus/src/deneb/execution_engine.rs index 68e9d9245..9463b9ce9 100644 --- a/ethereum-consensus/src/deneb/execution_engine.rs +++ b/ethereum-consensus/src/deneb/execution_engine.rs @@ -4,7 +4,6 @@ use crate::{ primitives::Root, state_transition::{ExecutionEngineError, Result}, }; -use ssz_rs::prelude::*; pub struct NewPayloadRequest< 'a, diff --git a/ethereum-consensus/src/deneb/execution_payload.rs b/ethereum-consensus/src/deneb/execution_payload.rs index c9cdaff85..4bc31e3cb 100644 --- a/ethereum-consensus/src/deneb/execution_payload.rs +++ b/ethereum-consensus/src/deneb/execution_payload.rs @@ -2,10 +2,9 @@ use crate::{ bellatrix::Transaction, capella::Withdrawal, primitives::{Bytes32, ExecutionAddress, Hash32, Root, U256}, - ssz::{ByteList, ByteVector}, + ssz::prelude::*, state_transition::Error, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, Clone, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/deneb/fork.rs b/ethereum-consensus/src/deneb/fork.rs index 3d10706aa..8fc449b6b 100644 --- a/ethereum-consensus/src/deneb/fork.rs +++ b/ethereum-consensus/src/deneb/fork.rs @@ -3,7 +3,6 @@ use crate::{ deneb::{BeaconState, ExecutionPayloadHeader, Fork}, state_transition::Context, }; -use ssz_rs::prelude::*; pub fn upgrade_to_deneb< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/deneb/genesis.rs b/ethereum-consensus/src/deneb/genesis.rs index 90129e3e5..73aa7e5c1 100644 --- a/ethereum-consensus/src/deneb/genesis.rs +++ b/ethereum-consensus/src/deneb/genesis.rs @@ -4,9 +4,9 @@ use crate::{ Deposit, DepositData, Eth1Data, ExecutionPayloadHeader, Fork, DEPOSIT_DATA_LIST_BOUND, }, primitives::{Gwei, Hash32, GENESIS_EPOCH}, + ssz::prelude::*, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; pub fn initialize_beacon_state_from_eth1< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/deneb/spec/mod.rs b/ethereum-consensus/src/deneb/spec/mod.rs index 25a074353..d5271612b 100644 --- a/ethereum-consensus/src/deneb/spec/mod.rs +++ b/ethereum-consensus/src/deneb/spec/mod.rs @@ -72,10 +72,9 @@ use crate::{ eth_aggregate_public_keys, eth_fast_aggregate_verify, fast_aggregate_verify, hash, verify_signature, }, - ssz::*, + ssz::prelude::*, }; use integer_sqrt::IntegerSquareRoot; -use ssz_rs::prelude::*; use std::{ cmp, collections::{HashMap, HashSet}, diff --git a/ethereum-consensus/src/kzg.rs b/ethereum-consensus/src/kzg.rs index 9cebc3593..89d2b199e 100644 --- a/ethereum-consensus/src/kzg.rs +++ b/ethereum-consensus/src/kzg.rs @@ -1,5 +1,4 @@ -use crate::{primitives::Bytes32, ssz::ByteVector}; -use ssz_rs::prelude::*; +use crate::{primitives::Bytes32, ssz::prelude::ByteVector}; pub const BYTES_PER_FIELD_ELEMENT: usize = 32; pub const KZG_COMMITMENT_BYTES_LEN: usize = 48; diff --git a/ethereum-consensus/src/phase0/beacon_block.rs b/ethereum-consensus/src/phase0/beacon_block.rs index e407e2a41..65814bbb5 100644 --- a/ethereum-consensus/src/phase0/beacon_block.rs +++ b/ethereum-consensus/src/phase0/beacon_block.rs @@ -3,8 +3,8 @@ use crate::{ Attestation, AttesterSlashing, Deposit, Eth1Data, ProposerSlashing, SignedVoluntaryExit, }, primitives::{BlsSignature, Bytes32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/phase0/beacon_state.rs b/ethereum-consensus/src/phase0/beacon_state.rs index 2b3619269..a343a1c06 100644 --- a/ethereum-consensus/src/phase0/beacon_state.rs +++ b/ethereum-consensus/src/phase0/beacon_state.rs @@ -6,8 +6,8 @@ use crate::{ validator::Validator, }, primitives::{Bytes32, Epoch, Gwei, Root, Slot, Version}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/phase0/block_processing.rs b/ethereum-consensus/src/phase0/block_processing.rs index 37942d7f4..6e4b3a95e 100644 --- a/ethereum-consensus/src/phase0/block_processing.rs +++ b/ethereum-consensus/src/phase0/block_processing.rs @@ -19,14 +19,13 @@ use crate::{ }, primitives::{BlsPublicKey, Bytes32, DomainType, Gwei, ValidatorIndex, FAR_FUTURE_EPOCH}, signing::{compute_signing_root, verify_signed_data}, - ssz::ByteVector, + ssz::prelude::*, state_transition::{ invalid_header_error, invalid_operation_error, Context, InvalidAttestation, InvalidAttesterSlashing, InvalidBeaconBlockHeader, InvalidDeposit, InvalidOperation, InvalidProposerSlashing, InvalidVoluntaryExit, Result, }, }; -use ssz_rs::prelude::*; use std::collections::HashSet; pub fn process_proposer_slashing< diff --git a/ethereum-consensus/src/phase0/epoch_processing.rs b/ethereum-consensus/src/phase0/epoch_processing.rs index e9679eed2..d68bd024c 100644 --- a/ethereum-consensus/src/phase0/epoch_processing.rs +++ b/ethereum-consensus/src/phase0/epoch_processing.rs @@ -12,10 +12,10 @@ use crate::{ operations::{Checkpoint, PendingAttestation}, }, primitives::{Epoch, Gwei, ValidatorIndex, GENESIS_EPOCH}, + ssz::prelude::*, state_transition::{Context, Error, Result}, }; use integer_sqrt::IntegerSquareRoot; -use ssz_rs::prelude::*; use std::{collections::HashSet, mem}; pub fn get_matching_source_attestations< diff --git a/ethereum-consensus/src/phase0/genesis.rs b/ethereum-consensus/src/phase0/genesis.rs index 1aab9a030..bf374463d 100644 --- a/ethereum-consensus/src/phase0/genesis.rs +++ b/ethereum-consensus/src/phase0/genesis.rs @@ -8,9 +8,9 @@ use crate::{ operations::{Deposit, DepositData, Eth1Data}, }, primitives::{Gwei, Hash32, GENESIS_EPOCH}, + ssz::prelude::*, state_transition::{Context, Result}, }; -use ssz_rs::prelude::*; pub fn initialize_beacon_state_from_eth1< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/phase0/helpers.rs b/ethereum-consensus/src/phase0/helpers.rs index cdefeda7e..ab02c609e 100644 --- a/ethereum-consensus/src/phase0/helpers.rs +++ b/ethereum-consensus/src/phase0/helpers.rs @@ -11,12 +11,12 @@ use crate::{ ValidatorIndex, Version, FAR_FUTURE_EPOCH, GENESIS_EPOCH, }, signing::compute_signing_root, + ssz::prelude::*, state_transition::{ invalid_operation_error, Context, Error, InvalidAttestation, InvalidIndexedAttestation, InvalidOperation, Result, }, }; -use ssz_rs::prelude::*; use std::{cmp, collections::HashSet}; pub fn is_active_validator(validator: &Validator, epoch: Epoch) -> bool { diff --git a/ethereum-consensus/src/phase0/networking.rs b/ethereum-consensus/src/phase0/networking.rs index 41424e683..0e2017286 100644 --- a/ethereum-consensus/src/phase0/networking.rs +++ b/ethereum-consensus/src/phase0/networking.rs @@ -1,5 +1,4 @@ -use crate::primitives::Epoch; -use ssz_rs::prelude::Bitvector; +use crate::{primitives::Epoch, ssz::prelude::Bitvector}; use std::time::Duration; pub const ATTESTATION_SUBNET_COUNT: usize = 64; diff --git a/ethereum-consensus/src/phase0/operations.rs b/ethereum-consensus/src/phase0/operations.rs index 30d5450c4..6ac95f42a 100644 --- a/ethereum-consensus/src/phase0/operations.rs +++ b/ethereum-consensus/src/phase0/operations.rs @@ -4,8 +4,8 @@ use crate::{ BlsPublicKey, BlsSignature, Bytes32, CommitteeIndex, Epoch, Gwei, Hash32, Root, Slot, ValidatorIndex, }, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Clone, Debug, SimpleSerialize, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/phase0/slot_processing.rs b/ethereum-consensus/src/phase0/slot_processing.rs index d28317a95..d96bb3651 100644 --- a/ethereum-consensus/src/phase0/slot_processing.rs +++ b/ethereum-consensus/src/phase0/slot_processing.rs @@ -1,9 +1,9 @@ use crate::{ phase0::{beacon_state::BeaconState, epoch_processing::process_epoch}, primitives::{Root, Slot}, + ssz::prelude::*, state_transition::{Context, Error, Result}, }; -use ssz_rs::prelude::*; pub fn process_slots< const SLOTS_PER_HISTORICAL_ROOT: usize, diff --git a/ethereum-consensus/src/phase0/state_transition.rs b/ethereum-consensus/src/phase0/state_transition.rs index f2a7bb759..44830a260 100644 --- a/ethereum-consensus/src/phase0/state_transition.rs +++ b/ethereum-consensus/src/phase0/state_transition.rs @@ -4,9 +4,9 @@ use crate::{ block_processing::process_block, helpers::verify_block_signature, slot_processing::process_slots, }, + ssz::prelude::*, state_transition::{Context, Error, Result, Validation}, }; -use ssz_rs::prelude::*; // `state_transition_block_in_slot` is separated out // to facilitate upgrades across forks which take place diff --git a/ethereum-consensus/src/phase0/validator.rs b/ethereum-consensus/src/phase0/validator.rs index e4429e9fb..b163d31e9 100644 --- a/ethereum-consensus/src/phase0/validator.rs +++ b/ethereum-consensus/src/phase0/validator.rs @@ -1,8 +1,8 @@ use crate::{ phase0::operations::Attestation, primitives::{BlsPublicKey, BlsSignature, Bytes32, Epoch, Gwei, Root, ValidatorIndex}, + ssz::prelude::*, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/ethereum-consensus/src/primitives.rs b/ethereum-consensus/src/primitives.rs index 80c229625..ea4b53a77 100644 --- a/ethereum-consensus/src/primitives.rs +++ b/ethereum-consensus/src/primitives.rs @@ -1,11 +1,9 @@ -use crate::ssz::ByteVector; +use crate::ssz::prelude::*; pub use crate::{ crypto::{PublicKey as BlsPublicKey, Signature as BlsSignature}, domains::DomainType, + ssz::prelude::U256, }; -use ssz_rs::prelude::*; - -pub use ssz_rs::prelude::U256; pub type Root = Node; pub type Slot = u64; diff --git a/ethereum-consensus/src/signing.rs b/ethereum-consensus/src/signing.rs index 9fd4bc7e3..8073f17a3 100644 --- a/ethereum-consensus/src/signing.rs +++ b/ethereum-consensus/src/signing.rs @@ -1,9 +1,9 @@ use crate::{ crypto::{verify_signature, SecretKey}, primitives::{BlsPublicKey, BlsSignature, Domain, Root}, + ssz::prelude::*, state_transition::Error, }; -use ssz_rs::prelude::*; #[derive(Default, Debug, SimpleSerialize)] pub struct SigningData { diff --git a/ethereum-consensus/src/ssz/byte_list.rs b/ethereum-consensus/src/ssz/byte_list.rs index 3cfc86bff..524167415 100644 --- a/ethereum-consensus/src/ssz/byte_list.rs +++ b/ethereum-consensus/src/ssz/byte_list.rs @@ -1,5 +1,5 @@ use super::write_bytes_to_lower_hex; -use ssz_rs::prelude::*; +use crate::ssz::prelude::*; use std::{ fmt, hash::{Hash, Hasher}, @@ -11,7 +11,7 @@ use std::{ pub struct ByteList(#[serde(with = "crate::serde::as_hex")] List); impl TryFrom<&[u8]> for ByteList { - type Error = ssz_rs::DeserializeError; + type Error = DeserializeError; fn try_from(bytes: &[u8]) -> Result { ByteList::::deserialize(bytes) @@ -69,7 +69,7 @@ mod tests { #[test] fn test_byte_list_serde() { let list = ByteList::<32>::try_from([255u8, 255u8].as_ref()).unwrap(); - let encoding = ssz_rs::serialize(&list).unwrap(); + let encoding = serialize(&list).unwrap(); assert_eq!(encoding, [255, 255]); let recovered_list = ByteList::<32>::deserialize(&encoding).unwrap(); diff --git a/ethereum-consensus/src/ssz/byte_vector.rs b/ethereum-consensus/src/ssz/byte_vector.rs index 494cf9c12..ff02bc41c 100644 --- a/ethereum-consensus/src/ssz/byte_vector.rs +++ b/ethereum-consensus/src/ssz/byte_vector.rs @@ -1,5 +1,5 @@ use super::write_bytes_to_lower_hex; -use ssz_rs::prelude::*; +use crate::ssz::prelude::*; use std::{ fmt, hash::{Hash, Hasher}, @@ -11,7 +11,7 @@ use std::{ pub struct ByteVector(#[serde(with = "crate::serde::as_hex")] Vector); impl TryFrom<&[u8]> for ByteVector { - type Error = ssz_rs::DeserializeError; + type Error = DeserializeError; fn try_from(bytes: &[u8]) -> Result { ByteVector::::deserialize(bytes) diff --git a/ethereum-consensus/src/ssz/mod.rs b/ethereum-consensus/src/ssz/mod.rs index 2f0acf87a..089f42233 100644 --- a/ethereum-consensus/src/ssz/mod.rs +++ b/ethereum-consensus/src/ssz/mod.rs @@ -13,5 +13,7 @@ fn write_bytes_to_lower_hex>(f: &mut fmt::Formatter<'_>, data: T) Ok(()) } -pub use byte_list::ByteList; -pub use byte_vector::ByteVector; +pub mod prelude { + pub use super::{byte_list::ByteList, byte_vector::ByteVector}; + pub use ssz_rs::prelude::*; +} diff --git a/ethereum-consensus/src/state_transition/error.rs b/ethereum-consensus/src/state_transition/error.rs index 4694cac0f..a5166aefa 100644 --- a/ethereum-consensus/src/state_transition/error.rs +++ b/ethereum-consensus/src/state_transition/error.rs @@ -2,9 +2,9 @@ use crate::{ crypto::Error as CryptoError, phase0::{AttestationData, BeaconBlockHeader, Checkpoint}, primitives::{BlsSignature, Bytes32, Epoch, Hash32, Root, Slot, ValidatorIndex}, + ssz::prelude::*, state_transition::Forks, }; -use ssz_rs::prelude::*; use thiserror::Error; #[derive(Debug, Error)] diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs index b9ff31ffb..75bf6ee1e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::EffectiveBalanceUpdatesTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_effective_balance_hysteresis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs index f0005b4e1..118e0c73e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::Eth1DataResetTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_eth_1_vote_no_reset() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs index 007e7dc62..fb6af5e51 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::HistoricalRootsUpdateTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_historical_root_accumulator() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs index 8a11f31a5..f8e8635df 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::InactivityUpdatesTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zero_inactivity_scores_empty_participation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs index ebab4ef19..a7e7a26ba 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::JustificationAndFinalizationTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_123_ok_support() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs index 428ffc565..03f8985c5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::ParticipationFlagUpdatesTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zeroed() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs index 6bc9799bd..9221d7feb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RandaoMixesResetTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_randao_mixes() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs index 454e1ae7a..fdcff2822 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RegistryUpdatesTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_activation_queue_activation_and_ejection_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs index b914a87ef..c46ce0ae0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RewardsAndPenaltiesTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_almost_empty_attestations() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings/pyspec_tests/mod.rs index e70ba273b..c30f53e3d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_low_penalty() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs index 6d4df7749..3e8d890da 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsResetTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_flush_slashings() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/finality/finality/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/finality/finality/pyspec_tests/mod.rs index 516a6b92d..2dd7695d3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/finality/finality/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/finality/finality/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::finality::FinalityTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_finality_no_updates_at_genesis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/fork/fork/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/fork/fork/pyspec_tests/mod.rs index cbffda6e4..62d53a863 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/fork/fork/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/fork/fork/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::fork::ForkTestCase; use ethereum_consensus::{altair::mainnet as spec, phase0::mainnet as phase0}; -use ssz_rs::prelude::*; #[test] fn test_altair_fork_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attestation/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attestation/pyspec_tests/mod.rs index 381c70206..5faa8d3d7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attestation/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attestation/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttestationTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_after_epoch_slots() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attester_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attester_slashing/pyspec_tests/mod.rs index c96b0d906..49cee8872 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attester_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/attester_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttesterSlashingTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_empty_indices() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/block_header/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/block_header/pyspec_tests/mod.rs index a80927944..6ac75ce40 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/block_header/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/block_header/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::BlockHeaderTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_multiple_blocks_single_slot() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/deposit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/deposit/pyspec_tests/mod.rs index bab84caa7..d998bccbe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/deposit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/deposit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::DepositTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_merkle_proof() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/proposer_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/proposer_slashing/pyspec_tests/mod.rs index fa5e4767b..7c930bd91 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/proposer_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/proposer_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ProposerSlashingTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_epochs_are_different() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/sync_aggregate/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/sync_aggregate/pyspec_tests/mod.rs index 0627b110f..ba25fe1ec 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/sync_aggregate/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/sync_aggregate/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::SyncAggregateTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_signature_bad_domain() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/voluntary_exit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/voluntary_exit/pyspec_tests/mod.rs index b0f3490ce..f72fc9735 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/voluntary_exit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/operations/voluntary_exit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::VoluntaryExitTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_default_exit_epoch_subsequent_exit() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/random/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/random/random/pyspec_tests/mod.rs index 10926a6e9..9aca5fd20 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/random/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/random/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::random::RandomTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_randomized_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/basic/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/basic/pyspec_tests/mod.rs index 812440d63..5a4b813ea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/basic/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/basic/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::BasicTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_balances_too_low_for_reward() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/leak/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/leak/pyspec_tests/mod.rs index 8e5d7a7e8..c1a2c7624 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/leak/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/leak/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::LeakTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_empty_leak() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/random/pyspec_tests/mod.rs index 06e04e271..e3def56e3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/rewards/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::RandomTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_full_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/blocks/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/blocks/pyspec_tests/mod.rs index 5d3ee9ded..787c1cdce 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/blocks/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/blocks/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::BlocksTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_attestation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/slots/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/slots/pyspec_tests/mod.rs index b3c080403..f5090de00 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/slots/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/sanity/slots/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::SlotsTestCase; use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_double_empty_epoch() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs index d57691d2d..93fe5ee25 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation/ssz_random/mod.rs index 5c268cdd8..b13e42253 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation_data/ssz_random/mod.rs index eb8efd083..b08108dcc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attestation_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attester_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attester_slashing/ssz_random/mod.rs index b1206ed99..df3fea6e4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attester_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/attester_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AttesterSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AttesterSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AttesterSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AttesterSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/AttesterSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block/ssz_random/mod.rs index af8fd148d..f7e7be1f7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_body/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_body/ssz_random/mod.rs index 85e4f28a3..9b661b1e6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_body/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_body/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_header/ssz_random/mod.rs index cb942c5a5..7ee7c1364 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/BeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/BeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/BeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/BeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/BeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_state/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_state/ssz_random/mod.rs index 0d0481c54..c12b7b585 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_state/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/beacon_state/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/checkpoint/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/checkpoint/ssz_random/mod.rs index 80bf2319e..d1c3467a5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/checkpoint/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/checkpoint/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs index 2c3bc252d..b41fba1b6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit/ssz_random/mod.rs index 9d325716b..173267525 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_data/ssz_random/mod.rs index b89b242a8..d5e6c9d51 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_message/ssz_random/mod.rs index 04697e4e3..5a04ac1d6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/deposit_message/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_block/ssz_random/mod.rs index 5bba53621..83236e435 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_data/ssz_random/mod.rs index fd95c6901..f63514a79 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/eth_1_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork/ssz_random/mod.rs index 3cad768fb..7473423fa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork_data/ssz_random/mod.rs index 4611455fa..e5a06b06a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/fork_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/historical_batch/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/historical_batch/ssz_random/mod.rs index 57007e60b..dc0b34074 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/historical_batch/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/historical_batch/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/indexed_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/indexed_attestation/ssz_random/mod.rs index 920b8009c..fcef58a0b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/indexed_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/indexed_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/IndexedAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/IndexedAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/IndexedAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/IndexedAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/IndexedAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/light_client_update/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/light_client_update/ssz_random/mod.rs index b13c37205..6e76de841 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/light_client_update/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/light_client_update/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/LightClientUpdate/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/LightClientUpdate/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/LightClientUpdate/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/LightClientUpdate/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/LightClientUpdate/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/pending_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/pending_attestation/ssz_random/mod.rs index a5adaf4d5..f4ba8d05c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/pending_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/pending_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/PendingAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/PendingAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/PendingAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/PendingAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/PendingAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/proposer_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/proposer_slashing/ssz_random/mod.rs index 28296c7f5..c2fabdc69 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/proposer_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/proposer_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ProposerSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ProposerSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ProposerSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ProposerSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/ProposerSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs index fb5c6977e..f004810bd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs index e52f59ebc..c53ab8266 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlock/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlock/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlock/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlock/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlock/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs index c9535923c..25f62caa4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs index e381b87d8..38dd36c8e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs index 57252ece1..75f09a802 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signing_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signing_data/ssz_random/mod.rs index d5168642c..f82c75494 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signing_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/signing_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregate/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregate/ssz_random/mod.rs index 5b2e0eb77..2f9dc620c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregate/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregate/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs index b6551c199..0fb8c1c12 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee/ssz_random/mod.rs index 5e7b31afc..ca9d1ace5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs index 93d9a8a21..3af7685dc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_message/ssz_random/mod.rs index 144d5510c..bc2fe391b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/sync_committee_message/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/validator/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/validator/ssz_random/mod.rs index 134d17d4f..49d8cdf84 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/validator/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/validator/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/voluntary_exit/ssz_random/mod.rs index c822b7c60..02d572e9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/ssz_static/voluntary_exit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/transition/core/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/transition/core/pyspec_tests/mod.rs index 42a835248..911b08956 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/transition/core/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/altair/transition/core/pyspec_tests/mod.rs @@ -7,7 +7,6 @@ use ethereum_consensus::{ phase0::mainnet as pre_spec, state_transition::mainnet::{BeaconState, Executor}, }; -use ssz_rs::prelude::*; #[test] fn test_normal_transition() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs index 818ee2c11..a3495eab5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::EffectiveBalanceUpdatesTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_effective_balance_hysteresis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs index 187012688..6bf5a0b2d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::Eth1DataResetTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_eth_1_vote_no_reset() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs index 42fc1b4a1..f7ca96ee9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::HistoricalRootsUpdateTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_historical_root_accumulator() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs index c6e27f1d9..cded6a6bc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::InactivityUpdatesTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zero_inactivity_scores_empty_participation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs index a641ab60f..e37c3aaae 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::JustificationAndFinalizationTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_123_ok_support() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs index 074fffa25..b34fa6698 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::ParticipationFlagUpdatesTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zeroed() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs index fcfacd6bb..bdf6db2e9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RandaoMixesResetTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_randao_mixes() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs index 67e897b56..845b4ab2a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RegistryUpdatesTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_activation_queue_activation_and_ejection_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs index c96dda1e7..2da64843e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RewardsAndPenaltiesTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_almost_empty_attestations() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs index 0610bc6ed..68859af31 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_low_penalty() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs index 6b0ccfef4..18ca3d8a4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsResetTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_flush_slashings() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/finality/finality/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/finality/finality/pyspec_tests/mod.rs index 96f34748f..af7491f06 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/finality/finality/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/finality/finality/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::finality::FinalityTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_finality_no_updates_at_genesis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/fork/fork/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/fork/fork/pyspec_tests/mod.rs index 8e64761a9..56a02d4e7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/fork/fork/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/fork/fork/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::fork::ForkTestCase; use ethereum_consensus::{altair::mainnet as altair, bellatrix::mainnet as spec}; -use ssz_rs::prelude::*; #[test] fn test_bellatrix_fork_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attestation/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attestation/pyspec_tests/mod.rs index 7d16bcd9f..de84e1d2f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attestation/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attestation/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttestationTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_after_epoch_slots() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs index fd5248bce..7bf870f66 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttesterSlashingTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_empty_indices() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/block_header/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/block_header/pyspec_tests/mod.rs index 6e5a6ce7d..120329a43 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/block_header/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/block_header/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::BlockHeaderTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_multiple_blocks_single_slot() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/deposit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/deposit/pyspec_tests/mod.rs index 84a7b1141..eed83e3e5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/deposit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/deposit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::DepositTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_merkle_proof() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/execution_payload/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/execution_payload/pyspec_tests/mod.rs index d73d203ca..e8b541ce6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/execution_payload/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/execution_payload/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ExecutionPayloadTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_everything_regular_payload() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs index 61f1f299d..0b8dd5229 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ProposerSlashingTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_epochs_are_different() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs index 471e6adf1..76f52e0f3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::SyncAggregateTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_signature_bad_domain() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs index 562472140..f1de3173b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::VoluntaryExitTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_default_exit_epoch_subsequent_exit() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/random/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/random/random/pyspec_tests/mod.rs index 71ae22cf2..a7785bcde 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/random/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/random/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::random::RandomTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_randomized_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/basic/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/basic/pyspec_tests/mod.rs index 765fc8c9f..0895f5574 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/basic/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/basic/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::BasicTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_balances_too_low_for_reward() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/leak/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/leak/pyspec_tests/mod.rs index b78e32bce..0ccf47866 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/leak/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/leak/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::LeakTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_empty_leak() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/random/pyspec_tests/mod.rs index 5f6611192..d773eac9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/rewards/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::RandomTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_full_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/blocks/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/blocks/pyspec_tests/mod.rs index 13c41d7ed..87242f5a9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/blocks/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/blocks/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::BlocksTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_attestation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/slots/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/slots/pyspec_tests/mod.rs index 373730611..da33415ac 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/slots/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/sanity/slots/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::SlotsTestCase; use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_double_empty_epoch() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs index 0255d937d..ce682d1b1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation/ssz_random/mod.rs index 175c1680f..43e7845a1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs index 72bd8b03d..d3fc465a1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttestationData/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttestationData/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttestationData/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttestationData/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttestationData/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs index ef11b3c9d..5a733c47e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs index 6500a2d01..b5b020f82 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs index 519d1de2e..103070b67 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs index 990ca685f..311dc30ca 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs index 299b65b01..4fcf7b6cd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs index 4ddcd47dd..057cd8fcb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs index 475e754f2..165321788 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit/ssz_random/mod.rs index 7ff009417..f6ad53a76 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs index 7438bad90..4c296f8c7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs index 77067a664..0395a2948 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/DepositMessage/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/DepositMessage/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/DepositMessage/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/DepositMessage/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/DepositMessage/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs index e39f48cc6..0dd1444fe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs index c634dfb2d..c46024fea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs index 674a5a0c4..1d428c1ca 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs index 8a3171ae3..5648edc79 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork/ssz_random/mod.rs index f7c47c6ff..a4c6d3055 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork_data/ssz_random/mod.rs index 6e03f2732..331d153ed 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/fork_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs index 573ff992a..c7d039ed3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs index 793d24bf4..49dcd2d2d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs index 7646d6527..69a268331 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs index 8c1a90fce..e974239ef 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/PendingAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/PendingAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/PendingAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/PendingAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/PendingAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pow_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pow_block/ssz_random/mod.rs index 924b610ac..0c5aaa822 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pow_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/pow_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs index 587e91aaa..c1242ed8c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs index 0dcc98795..187c84b3d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs index eebcc91b8..177d1ea56 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs index 6329b2984..258bf92cc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs index 0c1f03c44..3c5559aa3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs index 142059f7c..6cd4b1393 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signing_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signing_data/ssz_random/mod.rs index d04e0192b..57be4d32a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signing_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/signing_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs index 62ccd9bf3..7c7053818 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregate/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregate/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregate/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregate/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregate/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs index d6585ec1e..8722fba26 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs index 0fbd001da..f76d7e9cd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommittee/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommittee/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommittee/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommittee/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommittee/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs index e47de0c25..c953e63b3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs index f52b34acc..a84c4193d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/validator/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/validator/ssz_random/mod.rs index c1ba2d904..37aac1787 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/validator/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/validator/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs index 504a154ba..2a7f42ff3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/transition/core/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/transition/core/pyspec_tests/mod.rs index 3bb7062f0..38cdad93d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/transition/core/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/bellatrix/transition/core/pyspec_tests/mod.rs @@ -7,7 +7,6 @@ use ethereum_consensus::{ bellatrix::mainnet as spec, state_transition::mainnet::{BeaconState, Executor}, }; -use ssz_rs::prelude::*; #[test] fn test_normal_transition() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs index 402fd7bf2..722fd39fb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::EffectiveBalanceUpdatesTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_effective_balance_hysteresis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs index 8ff453cca..f9ca5d554 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::Eth1DataResetTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_eth_1_vote_no_reset() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs index 7087b23d4..a61a5f61e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::HistoricalRootsUpdateTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_historical_root_accumulator() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs index b17d366d3..a2654f901 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::JustificationAndFinalizationTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_123_ok_support() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs index 03066c83a..c9fdddd2b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::ParticipationRecordUpdatesTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_participation_record() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs index 90d9b4d14..5cba16810 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RandaoMixesResetTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_randao_mixes() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs index 18fb3b425..7f422d1a2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RegistryUpdatesTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_activation_queue_activation_and_ejection_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs index 6439e4137..e91428cbf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RewardsAndPenaltiesTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_almost_empty_attestations() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings/pyspec_tests/mod.rs index ab90d3cc9..7ad1792d1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_low_penalty() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs index d23f5dd45..68dfa264b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsResetTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_flush_slashings() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/finality/finality/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/finality/finality/pyspec_tests/mod.rs index 889026d8e..999725299 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/finality/finality/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/finality/finality/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::finality::FinalityTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_finality_no_updates_at_genesis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attestation/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attestation/pyspec_tests/mod.rs index 80a1cc6a5..e61600b27 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attestation/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attestation/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttestationTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_after_epoch_slots() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attester_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attester_slashing/pyspec_tests/mod.rs index 6d709e620..8178451af 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attester_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/attester_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttesterSlashingTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_empty_indices() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/block_header/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/block_header/pyspec_tests/mod.rs index c6ebb8339..187d6d67c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/block_header/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/block_header/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::BlockHeaderTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_multiple_blocks_single_slot() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/deposit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/deposit/pyspec_tests/mod.rs index 95296243e..6d93fc940 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/deposit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/deposit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::DepositTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_merkle_proof() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/proposer_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/proposer_slashing/pyspec_tests/mod.rs index eac5b96be..e3ab4f771 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/proposer_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/proposer_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ProposerSlashingTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_epochs_are_different() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/voluntary_exit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/voluntary_exit/pyspec_tests/mod.rs index d4d9fc773..2ff5a3eaf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/voluntary_exit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/operations/voluntary_exit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::VoluntaryExitTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_default_exit_epoch_subsequent_exit() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/random/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/random/random/pyspec_tests/mod.rs index a2ba7ad08..249e4ee7a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/random/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/random/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::random::RandomTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_randomized_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/basic/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/basic/pyspec_tests/mod.rs index d515abe00..74c18aaf8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/basic/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/basic/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::BasicTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_all_balances_too_low_for_reward() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/leak/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/leak/pyspec_tests/mod.rs index da29f4b74..51792e4a2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/leak/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/leak/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::LeakTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_empty_leak() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/random/pyspec_tests/mod.rs index fb562850f..2f2759763 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/rewards/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::RandomTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_full_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/blocks/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/blocks/pyspec_tests/mod.rs index 48b9e1446..b10de0bef 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/blocks/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/blocks/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::BlocksTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_attestation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/slots/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/slots/pyspec_tests/mod.rs index d969bf0b7..8097b68cf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/slots/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/sanity/slots/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::SlotsTestCase; use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; #[test] fn test_double_empty_epoch() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs index 0503dc6d2..1ea6c4599 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation/ssz_random/mod.rs index a49a920c9..6ca63855f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation_data/ssz_random/mod.rs index 8580d8585..f481f24cc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attestation_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attester_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attester_slashing/ssz_random/mod.rs index fcbe9e200..1525f94d0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attester_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/attester_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AttesterSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AttesterSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AttesterSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AttesterSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/AttesterSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block/ssz_random/mod.rs index ca567bc12..426ecced9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs index b6816aa6d..f99d950fe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs index 53e490394..c770dc89e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_state/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_state/ssz_random/mod.rs index 943ba2c2e..0a1ee3848 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_state/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/beacon_state/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/checkpoint/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/checkpoint/ssz_random/mod.rs index fcf46eec2..b8faf9533 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/checkpoint/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/checkpoint/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit/ssz_random/mod.rs index af9938d69..8582a4882 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_data/ssz_random/mod.rs index 9f1cd6deb..dbc4efc5a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_message/ssz_random/mod.rs index f1c79fb1b..4fb96da24 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/deposit_message/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_block/ssz_random/mod.rs index d27182dc4..0ee56050c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_data/ssz_random/mod.rs index 47c40d499..4bd735c3d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/eth_1_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork/ssz_random/mod.rs index a812fea2a..a8ed0ba94 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork_data/ssz_random/mod.rs index 5e14ab5e1..3a47409b9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/fork_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/historical_batch/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/historical_batch/ssz_random/mod.rs index b468cee6c..3f272c326 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/historical_batch/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/historical_batch/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs index d43a4a258..0010e991e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/IndexedAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/IndexedAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/IndexedAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/IndexedAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/IndexedAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/pending_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/pending_attestation/ssz_random/mod.rs index 9431d350c..dcb7b23fc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/pending_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/pending_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/PendingAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/PendingAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/PendingAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/PendingAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/PendingAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs index ace2da583..62702aeda 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/ProposerSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/ProposerSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/ProposerSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/ProposerSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/ProposerSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs index 53413abb0..2663a422b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs index 2a587be88..b0d547b8a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs index 6f8c8aabb..4946079f4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs index 5999bb852..0adbdb3cc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/mainnet/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signing_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signing_data/ssz_random/mod.rs index ae07b018f..30a550f6f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signing_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/signing_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/validator/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/validator/ssz_random/mod.rs index 8b006eca7..d4c24e9ee 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/validator/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/validator/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs index 28a6294fb..728705633 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/mainnet/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::mainnet as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::mainnet as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs index 0b4c405e6..4a2f32fba 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::EffectiveBalanceUpdatesTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_effective_balance_hysteresis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs index 65ad79fc1..14863f930 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::Eth1DataResetTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_eth_1_vote_no_reset() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs index 016341885..26c50bca8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/historical_roots_update/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::HistoricalRootsUpdateTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_historical_root_accumulator() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs index f672aacb0..9e2962f6b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/inactivity_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::InactivityUpdatesTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zero_inactivity_scores_empty_participation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs index 828774d67..40468fee8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::JustificationAndFinalizationTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_123_ok_support() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs index 8f2a2750d..4944cc3bf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::ParticipationFlagUpdatesTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zeroed() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs index 736c87155..9aa182a96 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RandaoMixesResetTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_randao_mixes() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs index e5381a624..696bd5090 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/registry_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RegistryUpdatesTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_activation_queue_activation_and_ejection_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs index d219a322f..f61b87152 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RewardsAndPenaltiesTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_almost_empty_attestations() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings/pyspec_tests/mod.rs index 5168aeabf..6dbb6b224 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_low_penalty() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs index c013d63fb..c8033c69c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/slashings_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsResetTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_flush_slashings() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs index f3e1cdc54..e85b7a018 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SyncCommitteeUpdatesTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_sync_committees_no_progress_not_boundary() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/finality/finality/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/finality/finality/pyspec_tests/mod.rs index f1fda4f62..eb89d60b1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/finality/finality/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/finality/finality/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::finality::FinalityTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_finality_no_updates_at_genesis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/fork/fork/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/fork/fork/pyspec_tests/mod.rs index 2c4868f57..91c5821d8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/fork/fork/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/fork/fork/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::fork::ForkTestCase; use ethereum_consensus::{altair::minimal as spec, phase0::minimal as phase0}; -use ssz_rs::prelude::*; #[test] fn test_altair_fork_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/initialization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/initialization/pyspec_tests/mod.rs index f3c220dc8..8af5f5b87 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/initialization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/initialization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::genesis::InitializationTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_initialize_beacon_state_from_eth_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/validity/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/validity/pyspec_tests/mod.rs index 9d4a19e41..b1d29f3cd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/validity/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/genesis/validity/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::genesis::ValidityTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_is_valid_genesis_state_false_invalid_timestamp() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attestation/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attestation/pyspec_tests/mod.rs index 95f5fd71f..b49fc3ffb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attestation/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attestation/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttestationTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_after_epoch_slots() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attester_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attester_slashing/pyspec_tests/mod.rs index db68f91bc..50740e98a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attester_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/attester_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttesterSlashingTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_empty_indices() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/block_header/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/block_header/pyspec_tests/mod.rs index 9216b4298..de233465d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/block_header/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/block_header/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::BlockHeaderTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_multiple_blocks_single_slot() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/deposit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/deposit/pyspec_tests/mod.rs index 54254392a..e115babfd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/deposit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/deposit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::DepositTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_merkle_proof() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/proposer_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/proposer_slashing/pyspec_tests/mod.rs index 04238ff4a..b7b7ea0db 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/proposer_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/proposer_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ProposerSlashingTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_epochs_are_different() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/sync_aggregate/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/sync_aggregate/pyspec_tests/mod.rs index d433f1ad4..86a756d18 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/sync_aggregate/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/sync_aggregate/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::SyncAggregateTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_signature_bad_domain() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/voluntary_exit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/voluntary_exit/pyspec_tests/mod.rs index fc2b6d6c2..1310fe34c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/voluntary_exit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/operations/voluntary_exit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::VoluntaryExitTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_default_exit_epoch_subsequent_exit() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/random/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/random/random/pyspec_tests/mod.rs index 391fafcb2..b3179a5dc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/random/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/random/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::random::RandomTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_randomized_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/basic/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/basic/pyspec_tests/mod.rs index 57f9551cb..d786f069b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/basic/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/basic/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::BasicTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_balances_too_low_for_reward() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/leak/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/leak/pyspec_tests/mod.rs index c84bd0f46..5fd0be044 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/leak/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/leak/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::LeakTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_empty_leak() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/random/pyspec_tests/mod.rs index da5733175..4fc44701c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/rewards/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::RandomTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_full_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/blocks/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/blocks/pyspec_tests/mod.rs index c9ea6cad3..0a90e6aeb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/blocks/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/blocks/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::BlocksTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_attestation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/slots/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/slots/pyspec_tests/mod.rs index 8a1af6660..edf66f328 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/slots/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/sanity/slots/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::SlotsTestCase; use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_double_empty_epoch() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs index 822d576ef..f4f687298 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_max/mod.rs index 1212165b1..968b3e805 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_nil/mod.rs index 366417ddc..3a81bc013 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_one/mod.rs index c4b2e7e02..edf36bfb7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs index 069438beb..8ba21916d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs index 62f3a3d63..aaea4a90d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AggregateAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_zero/mod.rs index c5c6745d2..bc4b47a2b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/aggregate_and_proof/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_lengthy/mod.rs index cec38d9ec..2dc82a47e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_max/mod.rs index f1fd52734..6c0cdee10 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_nil/mod.rs index 309769b48..1cbe671ea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_one/mod.rs index c0ffbfc73..0d63e5d80 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random/mod.rs index 6046b070a..a484fb41b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random_chaos/mod.rs index 2043c656a..718dffbce 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Attestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_zero/mod.rs index 2d5e41665..7941a44ab 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_lengthy/mod.rs index 007c377af..f7bd64ad7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_max/mod.rs index 4ba84e552..79b2130ce 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_nil/mod.rs index 809ddd163..fa1755bdc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_one/mod.rs index ffbdcbfa0..ab5aaa3e8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random/mod.rs index 2b1a5121a..41cd7ead6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random_chaos/mod.rs index 3ee704f74..0a1ad4612 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttestationData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_zero/mod.rs index 7f21c0324..c1db06571 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attestation_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_lengthy/mod.rs index e7adb9512..61c00f26b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_max/mod.rs index 0a9e4f93e..97762b931 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_nil/mod.rs index cec3c952a..2824f4e6f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_one/mod.rs index e7d8a2b2e..82fd8e1f2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random/mod.rs index 5bd23b0dd..b8011e130 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random_chaos/mod.rs index 768269552..b66c39a7a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/AttesterSlashing/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_zero/mod.rs index 6d4bc7547..7b67b0b77 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/attester_slashing/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_lengthy/mod.rs index 8646163bc..e93a3104a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_max/mod.rs index c117d368e..ed16f1c12 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_nil/mod.rs index fa4a68aa3..c852263a5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_one/mod.rs index ff49a4d02..7cf104053 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random/mod.rs index ff611f6aa..7b419b6b0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random_chaos/mod.rs index 6f40d8114..08688c2fc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_zero/mod.rs index 2ae72a868..d886e1117 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_lengthy/mod.rs index ffff58dd2..5a0887dba 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_max/mod.rs index 0ed14e08f..454b8f80f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_nil/mod.rs index e9c06a3c3..7579456f3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_one/mod.rs index 8caca29a7..02dfd31df 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random/mod.rs index b73e5b09a..269c0fd90 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs index 2a94f303c..e77dec6c6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockBody/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_zero/mod.rs index 4d69d9027..6cdbf0d21 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_body/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_lengthy/mod.rs index 473d4e0de..0ede7f4a2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_max/mod.rs index efde1abab..ced161b5d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_nil/mod.rs index 94abbfa47..0b6183d49 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_one/mod.rs index ec3628691..d361764aa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random/mod.rs index a890544f8..9eb7736f0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs index c17d62ea5..bfdb32a13 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_zero/mod.rs index 08e284802..0f02a6f05 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_block_header/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_lengthy/mod.rs index b9c7d4533..48f183f2e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_max/mod.rs index 8c6c6874a..a7d157efb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_nil/mod.rs index 10095eadd..23865fd2f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_one/mod.rs index 22cdac7ae..7fd5854cd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random/mod.rs index 187b292e4..a5f5c9b86 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random_chaos/mod.rs index c767cc795..2a1e66760 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/BeaconState/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_zero/mod.rs index 87be881ad..79a677c05 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/beacon_state/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_lengthy/mod.rs index aa1f05a51..288ea1545 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_max/mod.rs index 974971ae4..cb40c8678 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_nil/mod.rs index b4f00bed3..008339712 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_one/mod.rs index aab053689..537510dd7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random/mod.rs index c51102014..11863da63 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random_chaos/mod.rs index 1a694ccd8..62c34a479 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Checkpoint/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_zero/mod.rs index 7537331e2..00e5af844 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/checkpoint/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs index 10dcbac60..6bb904d61 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_max/mod.rs index 2f8e853c3..f6cfc7ac2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_nil/mod.rs index 68ed204e5..59187f047 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_one/mod.rs index ec1dfb8ef..f7214e48a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs index 9f77539f3..9288e53a7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs index 8a2f6ddef..d970f416e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_zero/mod.rs index 522ae3812..2ab1536d0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/contribution_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ContributionAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_lengthy/mod.rs index 286251144..46bf3a553 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_max/mod.rs index d2901142c..442bfa500 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_nil/mod.rs index 6ce9389bf..a26e59055 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_one/mod.rs index 30ee4128f..63860c22e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random/mod.rs index 64545378b..7d7e741c1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random_chaos/mod.rs index f94f70ca9..dd2d22b4f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_zero/mod.rs index 4fd5f2bb4..dff3a3e19 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_lengthy/mod.rs index 0c5090aed..4b178ed81 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_max/mod.rs index 4047b8ab5..906fb8334 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_nil/mod.rs index aa7e1af90..2533318d2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_one/mod.rs index 0a604d450..37e156da5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random/mod.rs index cb7911357..d27f7c98a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random_chaos/mod.rs index a2c4a2167..0834c0873 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_zero/mod.rs index 1bc3ffef5..bdc179fc0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_lengthy/mod.rs index 909c4efba..7dc81e2f6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_max/mod.rs index 6396a967c..5e03dbc68 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_nil/mod.rs index cc4fd1194..f2ed4fe84 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_one/mod.rs index 7ea9ee3b9..3bd5b4d89 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random/mod.rs index 990c9a67b..c2fd59e73 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random_chaos/mod.rs index 92f9529fe..d3b6b7c62 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/DepositMessage/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_zero/mod.rs index acb4a8882..fede5d0f6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/deposit_message/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_lengthy/mod.rs index 0b49a8d7d..7e1cfefb0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_max/mod.rs index 14bb0a45a..619eb4d05 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_nil/mod.rs index 1396c4e65..ba7c51d66 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_one/mod.rs index 8bc64dd33..56f51fda8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random/mod.rs index a44d22056..2c23b7d4f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random_chaos/mod.rs index 7cd74eb33..53adb0215 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Eth1Block/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_zero/mod.rs index e2e7c903f..eafd33513 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_lengthy/mod.rs index 789348004..38b828695 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_max/mod.rs index dcf5c8d51..89f35ed24 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_nil/mod.rs index 28fc1da40..0bb06785e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_one/mod.rs index 7b0e829ae..fa2f74ccd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random/mod.rs index 2eaa5d65f..bb98e7a0f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random_chaos/mod.rs index 2e99e1e69..3f442ebaa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_zero/mod.rs index 2498ea5f8..b1787e0ca 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/eth_1_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_lengthy/mod.rs index 11b454700..5c60c70af 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_max/mod.rs index d911f8f70..05551aa20 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_nil/mod.rs index 1d9d1c915..c57638bbd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_one/mod.rs index c217cee2a..896b89efb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random/mod.rs index da0a3f2bb..0e6e73464 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random_chaos/mod.rs index 4caefcf83..a24f961b6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_zero/mod.rs index f85e13caf..81c488b9f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_lengthy/mod.rs index d4f54fc0a..c8d1b2d7e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_max/mod.rs index a7e2eaad0..b2c2b0c2e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_nil/mod.rs index d6efcf0f6..c15f02248 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_one/mod.rs index 796d63835..9baf4bb43 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random/mod.rs index b5da0fd5e..3dc170f9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random_chaos/mod.rs index 8a4b9c029..b46b21bbc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_zero/mod.rs index 0534eee72..2ca3c85b3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/fork_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_lengthy/mod.rs index 1faa7aa61..1bfdb2b67 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_max/mod.rs index a99202f9b..dac58d1fa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_nil/mod.rs index c975fa818..f67dcc29c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_one/mod.rs index bc43bf0b5..9ebd24478 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random/mod.rs index 56118af11..4878bb253 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random_chaos/mod.rs index 7ec5c06b5..0eea1ac8a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/HistoricalBatch/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_zero/mod.rs index e5b803d02..080d3a4be 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/historical_batch/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_lengthy/mod.rs index e978d61f2..aeb105c63 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_max/mod.rs index 173fa11f3..0b43c00df 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_nil/mod.rs index 3569f9168..b01a958fa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_one/mod.rs index e011bc87e..0e25387e2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random/mod.rs index dc1758e7f..6d22ccfac 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs index 40c7ffbc7..535ba612b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_zero/mod.rs index 129fd1963..40bfb0b3b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/indexed_attestation/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/IndexedAttestation/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_lengthy/mod.rs index 9f95dd1a2..063618dee 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_max/mod.rs index 19045d3ed..194f37a57 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_nil/mod.rs index d1ad5d318..8925cbff9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_one/mod.rs index 04b2de75a..daf55d2f0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random/mod.rs index 1fbb2bf8a..4f213db84 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random_chaos/mod.rs index 6c57fc79b..211077fda 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/LightClientUpdate/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_zero/mod.rs index b244fe518..6975ff245 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/light_client_update/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_lengthy/mod.rs index b7ce87e51..0718d193b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_max/mod.rs index dce231321..415dc17d3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_nil/mod.rs index 20e795e0a..68a0c5d42 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_one/mod.rs index ff74d2808..4cdab0775 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random/mod.rs index d0c2acd5c..608bbafb1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random_chaos/mod.rs index d5a91883e..b40e01b48 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_zero/mod.rs index cc5ca7246..43cc06ef5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/pending_attestation/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/PendingAttestation/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_lengthy/mod.rs index 025e04d00..7173d6342 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_max/mod.rs index f95e0bde2..297ae9da6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_nil/mod.rs index 5d369b4ae..c99c0153e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_one/mod.rs index 2a882a255..c869432c9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random/mod.rs index 622174ba8..d2564d999 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs index f788efbd9..462534ce6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/ProposerSlashing/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_zero/mod.rs index 3f4341792..753a78620 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/proposer_slashing/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs index a2848f6a0..ad82e297e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs index b2575f311..9cd6da973 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs index d8205ba49..bd4a22825 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs index 834ababd0..e42ca769c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs index de5a0da07..45455e166 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs index f830fc000..1f22e2102 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs index d31b9ba5d..09478c849 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedAggregateAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs index 427de1255..89270dcf2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_max/mod.rs index a837244bd..a34928bc7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_nil/mod.rs index 3fc0ce70f..4d9737fa5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_one/mod.rs index 462e58d56..23c502f50 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs index fa5669058..11ea1312c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs index e6d5ec232..f37c95586 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_zero/mod.rs index 20260ce06..17c74a327 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs index 0c20123d3..cb1f4d170 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_max/mod.rs index 9125f2481..c61ad7ab8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs index 70c14032c..f9044ccca 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_one/mod.rs index 5525622d7..d8ef34fb8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs index a41fba107..e6b0bc33d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs index 974836a9a..532dbec63 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs index 7287f034e..da53943b7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedBeaconBlockHeader/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs index f72e526ff..fede75722 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs index 968ad59c4..a3fd6a2b5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs index 1e6d63b00..acda037a5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs index da292cf49..7d441dc2f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs index f254a9534..30122f8d9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs index 1f6f3c063..278045d71 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs index 3c66e16a5..9c51137d4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedContributionAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs index 2d072d667..0e6227fa8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_max/mod.rs index f9d4e5480..311f115e4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs index 26e1fec1b..78e2d459a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_one/mod.rs index 4043bfc1d..f952b3243 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs index 54084efc7..7f88d0790 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs index 355c22306..61948cde7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs index 6dd685abd..fbd492f22 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SignedVoluntaryExit/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_lengthy/mod.rs index d05c98bbe..7869b4823 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_max/mod.rs index acd96b08b..40e35d8ff 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_nil/mod.rs index 0d895f1f3..5da28253f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_one/mod.rs index 5c7d25b79..4611fe585 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random/mod.rs index 3b63fce4a..a388da182 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random_chaos/mod.rs index 05e75bd2b..8abf70472 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SigningData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_zero/mod.rs index 969d26cd4..855955ea5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/signing_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_lengthy/mod.rs index da4728b4c..b198d7e4f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_max/mod.rs index 18dc691ed..9702c1e2c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_nil/mod.rs index a39c39420..0500d331e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_one/mod.rs index 7b7ba753e..217d9ab9e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random/mod.rs index a480ce78e..7d5833db0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs index 75d3129a0..f2cd5d6b1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregate/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_zero/mod.rs index 01c42567e..82658deb8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregate/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs index c102a0ee8..67d2bd81e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs index 77c332e21..b1b180d0d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs index 256d20c86..f515010a1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs index 1719b62db..106439518 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs index 084f712a1..ebe18b747 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs index 17cb1c4c9..6fabf4f6b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs index 866d5d459..5cc97f862 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncAggregatorSelectionData/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_lengthy/mod.rs index e46005522..1da3e2922 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_max/mod.rs index 8c3f04263..e68fd8ed2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_nil/mod.rs index b257c973f..663a5d39f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_one/mod.rs index 4ded4129a..c292c7a02 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random/mod.rs index ff65507fc..af0c1b7f7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random_chaos/mod.rs index f988e146e..ab4f55d0f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommittee/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_zero/mod.rs index d9223a64a..e1c4bb020 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs index 1d9cd8169..b5302c610 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_max/mod.rs index 64387088f..9ae999023 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_nil/mod.rs index b8f0da84a..1bdbb0c26 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_one/mod.rs index fb84082a2..205eb645c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs index 2e47b6774..81757f854 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs index f429a0e81..96f621695 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_zero/mod.rs index 61edca3b6..c77229fef 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_contribution/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeContribution/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_lengthy/mod.rs index 34085b036..a2af41657 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_max/mod.rs index b19d38233..11c5476ab 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_nil/mod.rs index cdeda3af0..e52efa3fe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_one/mod.rs index 3cec26206..2c7dca5f2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random/mod.rs index 190e3349b..488ccd567 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs index 5425da5de..c34aa8378 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_zero/mod.rs index 3511db22c..d8e25a125 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/sync_committee_message/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/SyncCommitteeMessage/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_lengthy/mod.rs index 4ccb6685b..ccde851d8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_max/mod.rs index 7f8dbb4b4..629a84564 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_nil/mod.rs index 1bb7a95c7..3eec0a4fd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_one/mod.rs index b2e699c92..b06fe8a92 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random/mod.rs index bc4c9ae64..b89e4fa53 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random_chaos/mod.rs index 3dc3b2745..10d9a68d1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/Validator/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_zero/mod.rs index 2d797b2a4..e1030ae0f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/validator/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_lengthy/mod.rs index 8a68d2be3..e634d3f27 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_max/mod.rs index 5af7e3010..5c3d0f3fe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_nil/mod.rs index 88ac3a430..921139349 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_one/mod.rs index 1226ba7ca..536c0b5e3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random/mod.rs index ee6e67f49..bb7691b29 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs index 4dfcc6f0d..eaeabba8b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/altair/ssz_static/VoluntaryExit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_zero/mod.rs index 28ddac56f..0c2d6334e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/ssz_static/voluntary_exit/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::altair::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{altair::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/transition/core/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/transition/core/pyspec_tests/mod.rs index 4a24c43d0..f60630dc3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/transition/core/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/altair/transition/core/pyspec_tests/mod.rs @@ -7,7 +7,6 @@ use ethereum_consensus::{ phase0::minimal as pre_spec, state_transition::minimal::{BeaconState, Executor}, }; -use ssz_rs::prelude::*; #[test] fn test_normal_transition() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs index 7501d504a..c9d77c6c1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::EffectiveBalanceUpdatesTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_effective_balance_hysteresis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs index da9a9d611..1d71adb6f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::Eth1DataResetTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_eth_1_vote_no_reset() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs index d2bf42ef4..71df27d8d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/historical_roots_update/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::HistoricalRootsUpdateTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_historical_root_accumulator() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs index 5e4de8ef7..8c4cdec72 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/inactivity_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::InactivityUpdatesTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zero_inactivity_scores_empty_participation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs index cefc5d31b..59d4bc9c1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::JustificationAndFinalizationTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_123_ok_support() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs index 40e266bf6..b6a6b159b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/participation_flag_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::ParticipationFlagUpdatesTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_zeroed() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs index 6269f39ff..52e8bf70a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RandaoMixesResetTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_randao_mixes() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs index adb81528a..7e7199230 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/registry_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RegistryUpdatesTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_activation_queue_activation_and_ejection_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs index 59f54d14e..cf314213a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RewardsAndPenaltiesTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_almost_empty_attestations() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs index 804c99dbd..fd2d9c061 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_low_penalty() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs index b7477b4d2..e3beaed08 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/slashings_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsResetTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_flush_slashings() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs index 868847edd..7dd95b60f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/epoch_processing/sync_committee_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SyncCommitteeUpdatesTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_sync_committees_no_progress_not_boundary() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/finality/finality/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/finality/finality/pyspec_tests/mod.rs index 0e212f515..e241ea1f6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/finality/finality/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/finality/finality/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::finality::FinalityTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_finality_no_updates_at_genesis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/fork/fork/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/fork/fork/pyspec_tests/mod.rs index 67bdce60b..4d0f35ad8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/fork/fork/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/fork/fork/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::fork::ForkTestCase; use ethereum_consensus::{altair::minimal as altair, bellatrix::minimal as spec}; -use ssz_rs::prelude::*; #[test] fn test_bellatrix_fork_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/initialization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/initialization/pyspec_tests/mod.rs index 55b03d7c5..3d59346d7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/initialization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/initialization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::genesis::InitializationTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_initialize_beacon_state_from_eth_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/validity/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/validity/pyspec_tests/mod.rs index f4c13bd72..caa6b6bec 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/validity/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/genesis/validity/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::genesis::ValidityTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_is_valid_genesis_state_false_invalid_timestamp() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attestation/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attestation/pyspec_tests/mod.rs index e5795b8df..075f08fd3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attestation/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attestation/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttestationTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_after_epoch_slots() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs index 7b343a64b..62687a92b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/attester_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttesterSlashingTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_empty_indices() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/block_header/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/block_header/pyspec_tests/mod.rs index cb0b116e9..b86ed343a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/block_header/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/block_header/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::BlockHeaderTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_multiple_blocks_single_slot() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/deposit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/deposit/pyspec_tests/mod.rs index 4676b9868..b8de7610a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/deposit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/deposit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::DepositTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_merkle_proof() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/execution_payload/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/execution_payload/pyspec_tests/mod.rs index 8cbb6f8ea..8f9fa19cb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/execution_payload/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/execution_payload/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ExecutionPayloadTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_everything_regular_payload() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs index c22b14732..9d3873e06 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/proposer_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ProposerSlashingTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_epochs_are_different() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs index f583e792e..dccc68aba 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/sync_aggregate/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::SyncAggregateTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_signature_bad_domain() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs index c8b10b2f1..1c6bf2219 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/operations/voluntary_exit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::VoluntaryExitTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_default_exit_epoch_subsequent_exit() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/random/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/random/random/pyspec_tests/mod.rs index 526484769..f376fac02 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/random/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/random/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::random::RandomTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_randomized_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/basic/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/basic/pyspec_tests/mod.rs index 69496ff5a..12e54161f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/basic/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/basic/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::BasicTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_balances_too_low_for_reward() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/leak/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/leak/pyspec_tests/mod.rs index b92534cb9..58e9064b0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/leak/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/leak/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::LeakTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_empty_leak() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/random/pyspec_tests/mod.rs index 6a2969f75..9695c19e0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/rewards/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::RandomTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_full_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/blocks/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/blocks/pyspec_tests/mod.rs index ea5b1d3c0..b5188e81a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/blocks/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/blocks/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::BlocksTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_attestation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/slots/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/slots/pyspec_tests/mod.rs index ea8cf4036..438b2da60 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/slots/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/sanity/slots/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::SlotsTestCase; use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_double_empty_epoch() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs index e121d1022..923aaf47e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_max/mod.rs index 3c2cfe052..ea4d6fb1b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_nil/mod.rs index 9ba19f674..2c7701f2d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_one/mod.rs index 7411caaa4..8e809f1f1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs index 10cf218c8..1e435ab31 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs index cb214572a..4b0bb9527 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_zero/mod.rs index 7944da558..9582ec76a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/aggregate_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AggregateAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_lengthy/mod.rs index fa707e2ce..a3a409738 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_max/mod.rs index d4ac83eaa..84d12657a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_nil/mod.rs index fc8373884..d82020593 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_one/mod.rs index adb112935..579ac9bc4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random/mod.rs index 79c660bc1..72b69f94b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random_chaos/mod.rs index dfc35993b..a984f4166 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Attestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_zero/mod.rs index 46fa45f6e..9f2f69c3b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_lengthy/mod.rs index a04debc58..88d1a35c9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_max/mod.rs index fe77acd84..b0b103708 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_nil/mod.rs index 45db8ea46..9c830f72c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_one/mod.rs index e8c5324c6..aad7a8b5e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs index 370526c79..1562548be 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random_chaos/mod.rs index adad7c059..46e48bca7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_zero/mod.rs index 5034a758b..8891be72c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attestation_data/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttestationData/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_lengthy/mod.rs index 63656435b..238d8258c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_max/mod.rs index 4a4e080b2..a35b704cf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_nil/mod.rs index d932d1f85..ec2ea54f1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_one/mod.rs index bd196e14d..603d05727 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs index 142f14a60..70e9d0312 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random_chaos/mod.rs index 31f607e90..7891fc026 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_zero/mod.rs index e3e01fd0e..96884ae58 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/attester_slashing/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/AttesterSlashing/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_lengthy/mod.rs index db4291173..ed99048ce 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_max/mod.rs index ff38e435c..9e734f598 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_nil/mod.rs index 63d557260..c633ea4b2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_one/mod.rs index a3e52dac7..b4050704e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs index 1fa6ad385..bbcb3e41d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random_chaos/mod.rs index fc7f4a457..3c40847ad 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_zero/mod.rs index 507f1e1dc..da31c4f6d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_lengthy/mod.rs index d3093227d..14a6770ef 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_max/mod.rs index 383c7fcfb..a8cc40d74 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_nil/mod.rs index a4fd77d1c..a3c6cac68 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_one/mod.rs index 63e5b57b5..0bdf360a6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs index 99f544933..db14a66bf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs index 5953e9b86..12fadfe34 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_zero/mod.rs index 92d83b555..204c5aee8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_body/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockBody/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_lengthy/mod.rs index fd47330f1..cac9d1c89 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_max/mod.rs index 63c71392b..b0f5785ea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_nil/mod.rs index ac6bb27c6..75aa62da4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_one/mod.rs index 5db31087d..54efebb55 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs index ebd08012e..b1e33ba52 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs index 9806942f2..75696b479 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_zero/mod.rs index f9d0b9461..5c7f601a6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_block_header/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconBlockHeader/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_lengthy/mod.rs index 79990e9ad..591af13e6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_max/mod.rs index 979b0bc85..b0d1dc488 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_nil/mod.rs index 9e794e735..e7f88d5c3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_one/mod.rs index 834d17442..b9141a6fe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs index fafffd57c..4bdd6bb18 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random_chaos/mod.rs index 31cfec38f..32eea3866 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/BeaconState/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_zero/mod.rs index 58c1a9a18..f2b5c0576 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/beacon_state/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_lengthy/mod.rs index b0eb97ce2..311b60722 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_max/mod.rs index 1bedcc850..70151b739 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_nil/mod.rs index c0b5fc432..24e12c70f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_one/mod.rs index 0ab7380ad..0a9ac134e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs index e8b8bb23e..79ab58063 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random_chaos/mod.rs index e4f637967..ca2f1d6ad 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Checkpoint/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_zero/mod.rs index 330612f9d..982f14d6f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/checkpoint/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs index 2b773a52b..e3567947d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_max/mod.rs index fa8f9a86e..b696e5c33 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_nil/mod.rs index 8f0b9206c..31d172ffb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_one/mod.rs index 311558da4..ac85837af 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs index f95596ab2..f102d9627 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs index 3771581f8..fdc3ffff9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_zero/mod.rs index 42d0ff2f8..b9564f3c8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/contribution_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ContributionAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_lengthy/mod.rs index 3913cd897..d4a42dd20 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_max/mod.rs index fb823a1ca..8584f60f9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_nil/mod.rs index 75918d3e0..033843483 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_one/mod.rs index 5b3b59a34..ba06e73f5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random/mod.rs index 8ce310a38..5a93d1300 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random_chaos/mod.rs index 70108affc..1ce99c7b4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Deposit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_zero/mod.rs index 828bca8b2..2f7ac834b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_lengthy/mod.rs index 941382eda..979977a7a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_max/mod.rs index 9e729e24f..dd878ce6d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_nil/mod.rs index a2d352040..eced58c62 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_one/mod.rs index 20f154907..482ff3d2d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs index 4761de2bc..c0f91d0b5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random_chaos/mod.rs index 9f2898ca9..2938e583c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_zero/mod.rs index 8f7b5697f..cf0c55797 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_lengthy/mod.rs index 1d8c76936..29bd92d51 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_max/mod.rs index b47a69f66..7508e5d0b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_nil/mod.rs index bcab492fd..a261f8196 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_one/mod.rs index 3f3226815..df72c9074 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs index b0c2f23af..cec256529 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random_chaos/mod.rs index 9d64f0c68..dd0a2ecbd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/DepositMessage/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_zero/mod.rs index 53c713410..66be0d4a1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/deposit_message/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_lengthy/mod.rs index ca6c87b92..28a74824e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_max/mod.rs index 475f14069..afffa66c9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_nil/mod.rs index b25d6d545..5b4053574 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_one/mod.rs index e07a05fa3..b7c50d037 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs index 429b14515..d87eec01f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random_chaos/mod.rs index 753156b56..d99108bb6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Block/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_zero/mod.rs index e8a47b636..663190ab7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_lengthy/mod.rs index f0d68bc26..5b1a0a438 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_max/mod.rs index 214a0ac8e..581127df0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_nil/mod.rs index 43e205306..5b0e404a1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_one/mod.rs index 88c859f9d..b1dcb21a1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs index dc6a5ef1a..915ce4ae2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random_chaos/mod.rs index 1095200b0..db6466e5a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = Eth1DataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Eth1Data/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_zero/mod.rs index 3a6f10fdd..779da3c60 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/eth_1_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_lengthy/mod.rs index 9a4e5996a..75b0086be 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_max/mod.rs index debca261a..2b6140161 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_nil/mod.rs index 4f2a9553f..03584d960 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_one/mod.rs index fdfbc060c..68d050cda 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs index 682b34815..031e0a875 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random_chaos/mod.rs index eacf94678..3bd66a591 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_zero/mod.rs index 04ebeb5b7..b5a457a2e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayload/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_lengthy/mod.rs index 1ab54cbaa..c4f069439 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_max/mod.rs index ff72d6e23..ec9476226 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_nil/mod.rs index 1b66edff5..8ddab25dc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_one/mod.rs index 71c335af0..7a1ac8094 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs index 442584906..70e416156 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random_chaos/mod.rs index 7dc5b9a5f..340cd8364 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_zero/mod.rs index c98935bc9..1b9252f0a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/execution_payload_header/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ExecutionPayloadHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ExecutionPayloadHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ExecutionPayloadHeader/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_lengthy/mod.rs index eff4eb5db..ebc9dab7d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_max/mod.rs index 7bb6fd1ce..2ab343ba2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_nil/mod.rs index fb23f03eb..2d89bcc9f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_one/mod.rs index 25231fc4b..2608a79f5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random/mod.rs index 85f3ea448..76f6a86e0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random_chaos/mod.rs index 8d11c12b5..494bc4bf6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_zero/mod.rs index e4e92e62c..bf1df1b5d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_lengthy/mod.rs index 3a59f0a23..e03284dfd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_max/mod.rs index 3da95108b..d49f96fe1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_nil/mod.rs index 1d749f015..41de6ea8a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_one/mod.rs index fcb5e307d..ec66ae77c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random/mod.rs index cacfbac04..d79ad0c44 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random_chaos/mod.rs index c159c92fc..7e0668d4c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ForkDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ForkData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_zero/mod.rs index 21a2ad75b..78a9dbf98 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/fork_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_lengthy/mod.rs index 3719113c1..10a0850f1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_max/mod.rs index 1b15b4179..0a2bfac41 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_nil/mod.rs index 91dbcb3c8..2942c25c6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_one/mod.rs index 247b25246..c754819d4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs index c3a1d196a..792f64a12 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random_chaos/mod.rs index a5383ef66..154f20f00 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_zero/mod.rs index f1fcf8612..eaba59a65 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/historical_batch/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/HistoricalBatch/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_lengthy/mod.rs index f79c754b6..5116a6cd7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_max/mod.rs index fd854b8f0..e487fdbec 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_nil/mod.rs index 445b94e15..4fb89877b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_one/mod.rs index 9619e374a..35ddc48f1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs index adadddb6d..d66f9cc31 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs index 82da1525c..29673b5d8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_zero/mod.rs index d653b4d9d..cf98f672a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/indexed_attestation/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/IndexedAttestation/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_lengthy/mod.rs index dfa0385a7..9724c2ab9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_max/mod.rs index 0bf5f9128..6e183dd57 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_nil/mod.rs index 1eaf8e2dd..3bba73ca7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_one/mod.rs index a513e3034..ec8f19f4c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs index 6d588e55a..4db484939 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random_chaos/mod.rs index 3705a8a93..5d0cf18be 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_zero/mod.rs index e2c6b658b..f8098eea6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/light_client_update/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::LightClientUpdateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = LightClientUpdateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/LightClientUpdate/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_lengthy/mod.rs index 74c337988..5fb4cf0ac 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_max/mod.rs index 340549a03..a18f9eef1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_nil/mod.rs index cb4b51261..a85756566 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_one/mod.rs index fc1aaa638..26544c4c4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs index 2dd71b16d..5f98081b5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random_chaos/mod.rs index e47f14114..884376d48 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_zero/mod.rs index c7735f242..ce25c5341 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pending_attestation/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PendingAttestation/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_lengthy/mod.rs index 943e32d53..b3a1a7cd1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_max/mod.rs index 252c5c915..d85ef8f19 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_nil/mod.rs index 0471dfb66..5593ab9fb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_one/mod.rs index 4839d5244..6bfe4f5f2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random/mod.rs index 0723feb9a..430f3d03e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random_chaos/mod.rs index ad32293a0..b69ca1dcc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PowBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/PowBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_zero/mod.rs index 70bf6548f..341005e32 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/pow_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PowBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_lengthy/mod.rs index ecd1d5903..6ad4b8879 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_max/mod.rs index cf1945591..0936fe894 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_nil/mod.rs index 25605f7d7..26c7521d0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_one/mod.rs index 9f246b309..3e7de4f94 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs index 2c4268b43..23b1ea5ea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs index cbbaf735b..3ce0c7146 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_zero/mod.rs index 1a417c3d1..aefc0d023 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/proposer_slashing/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/ProposerSlashing/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs index cc0d46a4b..e5d3b63f2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs index 036bca8ed..e54aa998c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs index 00e0e0cee..6371e3f29 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs index ea71039be..e367c3e4f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs index 8c0cc14a1..f0148c6a3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs index a75bdd0d8..5ade23623 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs index 6c9cc5ae2..783c182d9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedAggregateAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs index e9bcaaacd..e3f834335 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_max/mod.rs index ac4b86e6d..b6f33cd46 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_nil/mod.rs index 4b379be1e..8a9142fd5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_one/mod.rs index 0d9aaf1b3..e1f3fa38d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs index 7627183e3..edb5ad752 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs index 5be55a822..ebfe8e8aa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_zero/mod.rs index 7e3ce8f48..66374cedd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlock/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs index 6119fad6f..7d8816d45 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_max/mod.rs index e06b336ee..052ded669 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs index 92b003c55..e17d19ac5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_one/mod.rs index 9971e4743..34b209836 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs index 7970c09da..5c3551ff3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs index 73b4a7349..332381c05 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs index 0876fd40c..fb9dc62a4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedBeaconBlockHeader/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs index ef55bc455..0cb66adc7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs index 41aed661f..127ee629b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs index f5638a5d7..b0158a2e3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs index d699b1d44..66eaa3105 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs index cc0c2c6d3..ddcc229e6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs index 9b89808dd..0cf10b8f1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs index 067b62ba7..4389b4719 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_contribution_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedContributionAndProofTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedContributionAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedContributionAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs index 03a9b255c..5365c9ca8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_max/mod.rs index ba73b3190..2a2125fb4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs index d2fddf1e1..1f9649c6a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_one/mod.rs index 66f94c05a..1f1b0a6ef 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs index 8d0af1764..8ef821dbd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs index 83b1c3810..d6c6ff0c3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs index ace519e5d..6bba89650 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SignedVoluntaryExit/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_lengthy/mod.rs index 1a9a34f1a..7d47cb725 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_max/mod.rs index 4af84b84a..a5258f9aa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_nil/mod.rs index 6d39ea144..79ad488aa 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_one/mod.rs index be50f0497..f075d57c7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random/mod.rs index 3981da9f5..93ba0a3fb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random_chaos/mod.rs index 17944cf76..bc302830e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SigningData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_zero/mod.rs index e671ed9db..d3ea43cd6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/signing_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_lengthy/mod.rs index bd17d3832..1ba21d746 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_max/mod.rs index ad949dd99..aef474681 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_nil/mod.rs index abc7a45f3..21bf9d9eb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_one/mod.rs index 70c290ab9..b91cd73fd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs index 71afd2bdc..4f9ec2361 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs index e68367a0b..c2667b969 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregateTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregate/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_zero/mod.rs index a6c443563..44fd51774 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregate/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregateTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs index e75303e73..520653452 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs index a3f24c508..5e8e5254d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs index ca8770b57..b0274a16b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs index c7443928e..c78e5ac97 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs index a980dac38..e00053745 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs index 459d81d46..a7ff51cbb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs index 8ad473b4c..48993efe7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_aggregator_selection_data/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncAggregatorSelectionDataTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncAggregatorSelectionDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncAggregatorSelectionData/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_lengthy/mod.rs index 9cd6afa07..8cdd03c60 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_max/mod.rs index f8962c2d8..b0d27c3ef 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_nil/mod.rs index e823e82bb..996573209 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_one/mod.rs index 1eb1df771..9a0dcb2a6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs index 0fa7650f7..dfc5019ca 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random_chaos/mod.rs index a4df23c80..beeb182e2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommittee/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_zero/mod.rs index aec19c85c..7a15be051 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs index bdac34f5a..29079bfe6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_max/mod.rs index 91b116bb7..5da41b6c3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_nil/mod.rs index 6167764d5..6ba0f1999 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_one/mod.rs index 7f86932e9..380ceb874 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs index 824bf4eaa..a1f6ddb00 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs index d33ca0036..211189e91 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_zero/mod.rs index c4f48f9bb..3fc7468ea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_contribution/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeContributionTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeContributionTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeContribution/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_lengthy/mod.rs index f291a75d5..f888ee10b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_max/mod.rs index af833397f..0c0f3b4eb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_nil/mod.rs index a1731a8df..dbd8d332b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_one/mod.rs index 98cdabe84..cf39e8964 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs index db1b36362..a318ae5df 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs index 192f06558..65d5ae4e3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_zero/mod.rs index bb923b552..621859c36 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/sync_committee_message/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SyncCommitteeMessageTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SyncCommitteeMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/SyncCommitteeMessage/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_lengthy/mod.rs index bc4ee90ff..fe1032fd2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_max/mod.rs index 2c0836b7a..95e03bbf7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_nil/mod.rs index a1250dfba..0a928f06e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_one/mod.rs index 831a425a5..192607a00 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random/mod.rs index 99ec1622d..6b861ddd9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random_chaos/mod.rs index 4d93dc596..0d61aee0a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/Validator/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_zero/mod.rs index 8da32aba3..46ec5035b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/validator/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_lengthy/mod.rs index 4e59ffe05..1b3e9126f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_max/mod.rs index a5d0e40c4..ef9d8dfc7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_nil/mod.rs index 31f34500c..5688a63e4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_one/mod.rs index d65e139fd..208afde6e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs index c7e37f1f8..347a7d1b5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs index f03186218..790e685fb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/bellatrix/ssz_static/VoluntaryExit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_zero/mod.rs index 6a6b45faa..2b428d9ec 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/ssz_static/voluntary_exit/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::bellatrix::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{bellatrix::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/transition/core/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/transition/core/pyspec_tests/mod.rs index ed3e9cd7b..c3c2af826 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/transition/core/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/bellatrix/transition/core/pyspec_tests/mod.rs @@ -7,7 +7,6 @@ use ethereum_consensus::{ bellatrix::minimal as spec, state_transition::minimal::{BeaconState, Executor}, }; -use ssz_rs::prelude::*; #[test] fn test_normal_transition() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs index 868df1d1a..ee71985f3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/effective_balance_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::EffectiveBalanceUpdatesTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_effective_balance_hysteresis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs index 4543dd597..cfc673a99 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/eth_1_data_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::Eth1DataResetTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_eth_1_vote_no_reset() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs index 62a49c8b3..88885733a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/historical_roots_update/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::HistoricalRootsUpdateTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_historical_root_accumulator() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs index 548299e57..7d142e485 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/justification_and_finalization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::JustificationAndFinalizationTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_123_ok_support() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs index 4f191d534..dab986daf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/participation_record_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::ParticipationRecordUpdatesTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_participation_record() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs index 35978a934..c0ca03a3e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/randao_mixes_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RandaoMixesResetTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_updated_randao_mixes() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs index d66956b5b..b44033954 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/registry_updates/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RegistryUpdatesTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_activation_queue_activation_and_ejection_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs index 15cee88ec..14ba98728 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/rewards_and_penalties/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::RewardsAndPenaltiesTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_almost_empty_attestations() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings/pyspec_tests/mod.rs index 002671ba6..20cd20b46 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_low_penalty() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs index bc59e3c13..9cbfcf9e4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/epoch_processing/slashings_reset/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::epoch_processing::SlashingsResetTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_flush_slashings() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/finality/finality/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/finality/finality/pyspec_tests/mod.rs index d7db06a94..7688db6d5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/finality/finality/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/finality/finality/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::finality::FinalityTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_finality_no_updates_at_genesis() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/initialization/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/initialization/pyspec_tests/mod.rs index 3aadb26b7..b608887bd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/initialization/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/initialization/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::genesis::InitializationTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_initialize_beacon_state_from_eth_1() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/validity/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/validity/pyspec_tests/mod.rs index 3e29840fd..18a022abd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/validity/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/genesis/validity/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::genesis::ValidityTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_is_valid_genesis_state_false_invalid_timestamp() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attestation/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attestation/pyspec_tests/mod.rs index f38a156d0..ef227f1b2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attestation/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attestation/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttestationTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_after_epoch_slots() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attester_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attester_slashing/pyspec_tests/mod.rs index d379fef85..5b2370ade 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attester_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/attester_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::AttesterSlashingTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_empty_indices() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/block_header/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/block_header/pyspec_tests/mod.rs index cb0e3fd1e..bd046472c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/block_header/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/block_header/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::BlockHeaderTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_invalid_multiple_blocks_single_slot() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/deposit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/deposit/pyspec_tests/mod.rs index 9c7f30c28..dfc3a5b9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/deposit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/deposit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::DepositTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_bad_merkle_proof() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/proposer_slashing/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/proposer_slashing/pyspec_tests/mod.rs index db2623e11..240cb38ad 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/proposer_slashing/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/proposer_slashing/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::ProposerSlashingTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_epochs_are_different() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/voluntary_exit/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/voluntary_exit/pyspec_tests/mod.rs index a617778a5..93a0aa15d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/voluntary_exit/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/operations/voluntary_exit/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::operations::VoluntaryExitTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_default_exit_epoch_subsequent_exit() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/random/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/random/random/pyspec_tests/mod.rs index 25bc5ddb9..f0b5a52fe 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/random/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/random/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::random::RandomTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_randomized_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/basic/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/basic/pyspec_tests/mod.rs index c87c4f2b1..340a9971d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/basic/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/basic/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::BasicTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_all_balances_too_low_for_reward() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/leak/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/leak/pyspec_tests/mod.rs index dc01a3849..453a74d1c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/leak/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/leak/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::LeakTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_empty_leak() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/random/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/random/pyspec_tests/mod.rs index 587ec821d..1bacabfa6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/random/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/rewards/random/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::rewards::RandomTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_full_random_0() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/blocks/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/blocks/pyspec_tests/mod.rs index fb5699533..f76d21182 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/blocks/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/blocks/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::BlocksTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_attestation() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/slots/pyspec_tests/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/slots/pyspec_tests/mod.rs index e1c904c87..3ff3d1bdf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/slots/pyspec_tests/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/sanity/slots/pyspec_tests/mod.rs @@ -3,7 +3,6 @@ use crate::spec_test_runners::sanity::SlotsTestCase; use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; #[test] fn test_double_empty_epoch() { diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs index 4604456e7..243ab8de0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_max/mod.rs index d7a173dc9..a5bd79c72 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_nil/mod.rs index 963544da5..3322464f2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_one/mod.rs index ea4c14806..43fc59d43 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs index b01196ccf..ece988803 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs index 8e2d6e95c..35fd3cca6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AggregateAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_zero/mod.rs index f559e3760..c8652eb03 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/aggregate_and_proof/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_lengthy/mod.rs index 531ad8b95..4c9c0d3db 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_max/mod.rs index 3d427ba26..55fe641b9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_nil/mod.rs index 917fa0962..0fef70e3c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_one/mod.rs index 2146deb21..bdc78f54e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random/mod.rs index af2c9039b..7aab1e831 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random_chaos/mod.rs index b17cd67cc..f19cfa2bd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Attestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_zero/mod.rs index 440d3f76c..30d4f489c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_lengthy/mod.rs index f405e785f..adf9e7ff7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_max/mod.rs index ae14f1b8b..87107ac9f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_nil/mod.rs index 2f4e9d528..8e7632d1d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_one/mod.rs index dc93d66a2..98f1d175f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random/mod.rs index 328d71ff6..006947f34 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random_chaos/mod.rs index e09b10e8d..2268116df 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttestationDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttestationData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_zero/mod.rs index 8d097d67f..560fc2ae9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attestation_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttestationDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_lengthy/mod.rs index d44183fec..7d6869fd1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_max/mod.rs index c702ac923..3ca156500 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_nil/mod.rs index 0040465fd..f4116850b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_one/mod.rs index 5c60bc52e..fcfa31cb1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random/mod.rs index 13cb1dd58..8cd283d33 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random_chaos/mod.rs index 88e7b3791..ef703920a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = AttesterSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/AttesterSlashing/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_zero/mod.rs index ca673f903..861f00011 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/attester_slashing/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::AttesterSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_lengthy/mod.rs index 76812a1d7..259604fbc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_max/mod.rs index 529051c81..b9e294b3b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_nil/mod.rs index 018b76633..9719d5ab3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_one/mod.rs index 2a4169b99..b0f289a2e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random/mod.rs index 52cc85ce7..30093bc51 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random_chaos/mod.rs index 154f71952..bad76aa9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_zero/mod.rs index 71c0b6a2a..8105ddd85 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_lengthy/mod.rs index 2d29e7c82..e2d190bb6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_max/mod.rs index 48836d157..d1a56c338 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_nil/mod.rs index 9e9a92144..af1bc42f9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_one/mod.rs index d3d2d7073..5eee0f9e6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs index ec26c4986..a0890b883 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs index 6a1e5d4dc..86ca1078a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockBodyTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockBody/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_zero/mod.rs index f4fce25d9..b396a190b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_body/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockBodyTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_lengthy/mod.rs index 1e9b36673..29dd9fe9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_max/mod.rs index 845715ded..6a7af1c2f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_nil/mod.rs index fc507186a..61d1b02ad 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_one/mod.rs index 0b191c792..c858e6cdc 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs index 53bd9cd9e..ad63bf386 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs index 1fdd3b8e1..d324170cb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconBlockHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_zero/mod.rs index 6e23b7d33..1fbe05d34 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_block_header/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_lengthy/mod.rs index d87cccebe..0741ff269 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_max/mod.rs index d6b19685d..d98c4f510 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_nil/mod.rs index abde95100..3492304a2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_one/mod.rs index debe07e5b..1c0c4903c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random/mod.rs index 2efe759da..7edd1f140 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random_chaos/mod.rs index f0309bba8..e3eb6f4c4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = BeaconStateTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/BeaconState/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_zero/mod.rs index 6819221f6..173891236 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/beacon_state/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::BeaconStateTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_lengthy/mod.rs index 99b97a410..f8cbfd965 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_max/mod.rs index 3efed0fb7..b725a9a02 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_nil/mod.rs index bb02ada61..7f614fb62 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_one/mod.rs index 46e3841c5..84f6fa202 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random/mod.rs index 809686749..537c66d06 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random_chaos/mod.rs index 7e46fd338..dc94e4393 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = CheckpointTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Checkpoint/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_zero/mod.rs index 41a44bed8..2fcaeb0f3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/checkpoint/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::CheckpointTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_lengthy/mod.rs index f1dbeebf0..6d25d4915 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_max/mod.rs index 6572ef573..6a61da1d9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_nil/mod.rs index 0faa78c89..6188b2fee 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_one/mod.rs index a2d7ff4da..502a2c9a8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random/mod.rs index 170b9ed29..ba96938c8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random_chaos/mod.rs index ea0e93c10..98b53bf4f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_zero/mod.rs index 83b0d531b..72cadf050 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_lengthy/mod.rs index e2687f94d..610c490b1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_max/mod.rs index 06552eed3..919e93148 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_nil/mod.rs index 37f21ebfc..786e96661 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_one/mod.rs index dc87e940e..9d0196a26 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random/mod.rs index 1b043323c..61a3c4372 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random_chaos/mod.rs index 4fbb2412f..2d425fac1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_zero/mod.rs index b75b7488b..b9d569cf2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_lengthy/mod.rs index 50d70f018..61fe65307 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_max/mod.rs index 6022f30ca..713371928 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_nil/mod.rs index c5c989153..e031bcc03 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_one/mod.rs index 4d458fbb1..f20e44f68 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random/mod.rs index 33f301c86..bf3a368e1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random_chaos/mod.rs index e2c08401a..e74d65a84 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = DepositMessageTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/DepositMessage/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_zero/mod.rs index f50561bdb..a28beedd8 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/deposit_message/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::DepositMessageTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_lengthy/mod.rs index a93a98110..80fea28e5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_max/mod.rs index 426b69d05..82c7a755c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_nil/mod.rs index 405f2ef7e..9be785199 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_one/mod.rs index 290a88240..3b1a407df 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random/mod.rs index ebaa3b4df..f3fed9dc1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random_chaos/mod.rs index a2748a204..d362c919e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = Eth1BlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Eth1Block/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_zero/mod.rs index 9750eec45..42fecba7c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1BlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_lengthy/mod.rs index d04223f3e..ec83632c9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_max/mod.rs index 229281fa2..145f401b0 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_nil/mod.rs index 5ceb10f03..41a4384ba 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_one/mod.rs index c45bd7b72..f371745a3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random/mod.rs index 624336f89..bf5cee71e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random_chaos/mod.rs index 717ece87b..80c3c8a9a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_zero/mod.rs index 1a304e3d7..62421cbb2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/eth_1_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::Eth1DataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_lengthy/mod.rs index bcb990f74..65b09132a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_max/mod.rs index a7bb47254..cc01c90cb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_nil/mod.rs index 38991e1a7..c504bf230 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_one/mod.rs index d2c648fae..7ff30e41d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random/mod.rs index 79db1f296..7cc55bb9c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random_chaos/mod.rs index 994c86eee..f79b332a3 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +25,8 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +39,8 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +53,8 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +67,8 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +81,8 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +95,8 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +109,8 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +123,8 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +137,8 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +151,8 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +165,8 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +179,8 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +193,8 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +207,8 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +221,8 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +235,8 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +249,8 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +263,8 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +277,8 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +291,8 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +305,8 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +319,8 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +333,8 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +347,8 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +361,8 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +375,8 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +389,8 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +403,8 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +417,8 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_zero/mod.rs index 2a3f3e965..4bac30e24 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,8 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_lengthy/mod.rs index 478ce889d..1282cd1c6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_max/mod.rs index 95615700f..ee2a0da5f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_nil/mod.rs index b956960a6..774551305 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_one/mod.rs index 5246a1b3f..ab9b17eb1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random/mod.rs index c8b6a52a4..bdb7eb7b2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random_chaos/mod.rs index 0731e0fac..8b90b764b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_zero/mod.rs index 9af13e25c..87113115f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/fork_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ForkDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_lengthy/mod.rs index b407a2332..2eb627f05 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_max/mod.rs index 0cd09f38e..4ef7678ee 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_nil/mod.rs index 4642ca20d..dc4e9d6d4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_one/mod.rs index 84069248c..f6af3679d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random/mod.rs index aee1ea9ed..9e7c01922 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random_chaos/mod.rs index b35c5ec30..39af0f27c 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = HistoricalBatchTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/HistoricalBatch/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_zero/mod.rs index a9028473b..7b9f975a6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/historical_batch/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::HistoricalBatchTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_lengthy/mod.rs index b125db348..570d31e50 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_max/mod.rs index 077e6e667..cc586d089 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_nil/mod.rs index a25dd6d3f..c7855d713 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_one/mod.rs index 7e76ed85f..6cbd9a850 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs index ca1ebdef0..f70ac9bbd 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs index 605368610..c7eaf70d1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_zero/mod.rs index cfd2388a9..60decda10 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/indexed_attestation/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::IndexedAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = IndexedAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/IndexedAttestation/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_lengthy/mod.rs index 54dc7d90e..ad3b68e76 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_max/mod.rs index 2b2e19dd5..7ab7b57d9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_nil/mod.rs index e9d98d736..2b79636e2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_one/mod.rs index bf5206c5c..9847f1398 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random/mod.rs index 4ca18b933..7f2148e77 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random_chaos/mod.rs index de24dd8fa..d157383f4 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_zero/mod.rs index f93de89ea..8202f28ea 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/pending_attestation/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::PendingAttestationTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = PendingAttestationTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/PendingAttestation/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_lengthy/mod.rs index a3aeb054e..e69c44e14 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_max/mod.rs index ac4f10a34..4d143a7d2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_nil/mod.rs index 3cbe5c21d..19d905a88 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_one/mod.rs index 61e4bd66c..28d4ec463 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs index 3506bdc5d..a07b99654 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs index 71934f102..26538fe2f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = ProposerSlashingTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/ProposerSlashing/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_zero/mod.rs index 75b8eb9ba..a78547c54 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/proposer_slashing/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ProposerSlashingTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs index 2f470b124..0b34fa49b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs index 28e6fb18c..ad16ca811 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs index 0befc9c9f..971e35e8d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs index e5c9224b8..0d820870a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs index f6f544063..7436cfff2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs index 08b906572..30e41a80d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs index 6f393c0d6..aca6c6f5e 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_aggregate_and_proof/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedAggregateAndProofTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedAggregateAndProofTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedAggregateAndProof/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs index 6216bfc46..76a6b8bf2 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_max/mod.rs index f2315ed11..9bca16c5f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_nil/mod.rs index b581a1f24..08123bf58 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_one/mod.rs index 1a13ba1f7..2aea7d7a5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs index 47a96cbc0..5457bae80 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs index bb29fc306..b6523524f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlock/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_zero/mod.rs index ee06b9302..a2f510cb5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs index 4132e47a6..c7b1ae253 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_max/mod.rs index fe77632d4..f4968cf01 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs index f48f751dc..12d54d41f 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_one/mod.rs index d97bec57d..37efff4f9 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs index c4cbc5a65..968b085d7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs index 592b96105..07431c5fb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs index a59a34a4c..c2796b211 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_beacon_block_header/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedBeaconBlockHeaderTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedBeaconBlockHeaderTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedBeaconBlockHeader/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs index db9387929..ecb2ad693 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_lengthy/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_lengthy/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_max/mod.rs index 3d4474aad..5e977d30b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_max/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_max/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs index 4e688fcda..7e73b71d6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_nil/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_nil/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_one/mod.rs index 04c994c28..e3f69a538 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_one/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_one/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs index c4bceff5a..788dc0e0d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs index 0b26fc684..83f615e0d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs index 510289f1f..a8d2e08b5 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signed_voluntary_exit/ssz_zero/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SignedVoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SignedVoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SignedVoluntaryExit/ssz_zero/case_0"); test_case.execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_lengthy/mod.rs index 5d75f54c0..715edaf9d 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_max/mod.rs index 931d28ab2..cd8f9e653 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_nil/mod.rs index 14678f36a..ae071dd54 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_one/mod.rs index 0123eef36..f13b1fad1 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random/mod.rs index 625c27a56..5d0989e84 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random_chaos/mod.rs index cbbd449d2..fee041f6b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = SigningDataTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/SigningData/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_zero/mod.rs index cb4de2c3e..7198f3daf 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/signing_data/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::SigningDataTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_lengthy/mod.rs index 332ec861f..426c2b1e6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_max/mod.rs index b4d5bf38b..4b5f8eee6 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_nil/mod.rs index 6b947a538..8ee454029 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_one/mod.rs index c7c9c3e42..c1cb7af39 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random/mod.rs index 99ec0f7a9..55e4fc860 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random_chaos/mod.rs index 0e16bdb2e..f88922e02 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_random_chaos/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -38,8 +39,9 @@ fn test_case_10() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -50,8 +52,9 @@ fn test_case_11() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -62,8 +65,9 @@ fn test_case_12() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -74,8 +78,9 @@ fn test_case_13() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -86,8 +91,9 @@ fn test_case_14() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -98,8 +104,9 @@ fn test_case_15() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +117,9 @@ fn test_case_16() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -122,8 +130,9 @@ fn test_case_17() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -134,8 +143,9 @@ fn test_case_18() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -146,8 +156,9 @@ fn test_case_19() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -160,8 +171,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -172,8 +184,9 @@ fn test_case_20() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -184,8 +197,9 @@ fn test_case_21() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -196,8 +210,9 @@ fn test_case_22() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +223,9 @@ fn test_case_23() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -220,8 +236,9 @@ fn test_case_24() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -232,8 +249,9 @@ fn test_case_25() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -244,8 +262,9 @@ fn test_case_26() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -256,8 +275,9 @@ fn test_case_27() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -268,8 +288,9 @@ fn test_case_28() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -280,8 +301,9 @@ fn test_case_29() { let test_case = ValidatorTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/Validator/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -294,8 +316,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -308,8 +331,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +346,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -336,8 +361,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -350,8 +376,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -364,8 +391,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -378,8 +406,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_zero/mod.rs index a28b5a782..510fd95bb 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/validator/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::ValidatorTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_lengthy/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_lengthy/mod.rs index 9886a1460..beb13548b 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_lengthy/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_lengthy/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_max/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_max/mod.rs index 5cca0f02b..0c03d21ad 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_max/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_max/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_nil/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_nil/mod.rs index 712a86093..95ce1892a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_nil/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_nil/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_one/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_one/mod.rs index 9db5ad05e..505a29f68 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_one/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_one/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs index 3560bf71e..7b3897454 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -26,8 +26,9 @@ fn test_case_1() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -40,8 +41,9 @@ fn test_case_10() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -54,8 +56,9 @@ fn test_case_11() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -68,8 +71,9 @@ fn test_case_12() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +86,9 @@ fn test_case_13() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -96,8 +101,9 @@ fn test_case_14() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -110,8 +116,9 @@ fn test_case_15() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -124,8 +131,9 @@ fn test_case_16() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -138,8 +146,9 @@ fn test_case_17() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -152,8 +161,9 @@ fn test_case_18() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +176,9 @@ fn test_case_19() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -180,8 +191,9 @@ fn test_case_2() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -194,8 +206,9 @@ fn test_case_20() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -208,8 +221,9 @@ fn test_case_21() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -222,8 +236,9 @@ fn test_case_22() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -236,8 +251,9 @@ fn test_case_23() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +266,9 @@ fn test_case_24() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -264,8 +281,9 @@ fn test_case_25() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -278,8 +296,9 @@ fn test_case_26() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -292,8 +311,9 @@ fn test_case_27() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -306,8 +326,9 @@ fn test_case_28() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -320,8 +341,9 @@ fn test_case_29() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +356,9 @@ fn test_case_3() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -348,8 +371,9 @@ fn test_case_4() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -362,8 +386,9 @@ fn test_case_5() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -376,8 +401,9 @@ fn test_case_6() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -390,8 +416,9 @@ fn test_case_7() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -404,8 +431,9 @@ fn test_case_8() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -418,8 +446,9 @@ fn test_case_9() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs index a87444f3d..74a478be7 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_random_chaos/mod.rs @@ -2,16 +2,16 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_0"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -22,8 +22,9 @@ fn test_case_1() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_1"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -34,8 +35,9 @@ fn test_case_10() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_10"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -46,8 +48,9 @@ fn test_case_11() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_11"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -58,8 +61,9 @@ fn test_case_12() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_12"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -70,8 +74,9 @@ fn test_case_13() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_13"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -82,8 +87,9 @@ fn test_case_14() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_14"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -94,8 +100,9 @@ fn test_case_15() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_15"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -106,8 +113,9 @@ fn test_case_16() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_16"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -118,8 +126,9 @@ fn test_case_17() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_17"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -130,8 +139,9 @@ fn test_case_18() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_18"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -142,8 +152,9 @@ fn test_case_19() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_19"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -154,8 +165,9 @@ fn test_case_2() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_2"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -166,8 +178,9 @@ fn test_case_20() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_20"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -178,8 +191,9 @@ fn test_case_21() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_21"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -190,8 +204,9 @@ fn test_case_22() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_22"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -202,8 +217,9 @@ fn test_case_23() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_23"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -214,8 +230,9 @@ fn test_case_24() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_24"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -226,8 +243,9 @@ fn test_case_25() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_25"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -238,8 +256,9 @@ fn test_case_26() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_26"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -250,8 +269,9 @@ fn test_case_27() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_27"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -262,8 +282,9 @@ fn test_case_28() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_28"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -274,8 +295,9 @@ fn test_case_29() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_29"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -286,8 +308,9 @@ fn test_case_3() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_3"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -298,8 +321,9 @@ fn test_case_4() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_4"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -310,8 +334,9 @@ fn test_case_5() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_5"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -322,8 +347,9 @@ fn test_case_6() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_6"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -334,8 +360,9 @@ fn test_case_7() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_7"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -346,8 +373,9 @@ fn test_case_8() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_8"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); @@ -358,8 +386,9 @@ fn test_case_9() { let test_case = VoluntaryExitTestCase::<>::from("../consensus-spec-tests/tests/minimal/phase0/ssz_static/VoluntaryExit/ssz_random_chaos/case_9"); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_zero/mod.rs b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_zero/mod.rs index 340cbf703..87d9e571a 100644 --- a/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_zero/mod.rs +++ b/ethereum-consensus/tests/consensus_spec_tests/minimal/phase0/ssz_static/voluntary_exit/ssz_zero/mod.rs @@ -2,8 +2,7 @@ // This file was generated with `gen-tests`. Do NOT edit manually. use crate::spec_test_runners::ssz_static::VoluntaryExitTestCase; -use ethereum_consensus::phase0::minimal as spec; -use ssz_rs::prelude::*; +use ethereum_consensus::{phase0::minimal as spec, ssz::prelude::*}; #[test] fn test_case_0() { @@ -12,8 +11,9 @@ fn test_case_0() { ); test_case.execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = + ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) }); diff --git a/ethereum-consensus/tests/spec_test_runners/rewards/mod.rs b/ethereum-consensus/tests/spec_test_runners/rewards/mod.rs index 0d95f978f..6b346c57a 100644 --- a/ethereum-consensus/tests/spec_test_runners/rewards/mod.rs +++ b/ethereum-consensus/tests/spec_test_runners/rewards/mod.rs @@ -1,6 +1,5 @@ use crate::test_utils::{load_snappy_ssz, Config}; -use ethereum_consensus::{primitives::Gwei, state_transition::Context}; -use ssz_rs::prelude::*; +use ethereum_consensus::{primitives::Gwei, ssz::prelude::*, state_transition::Context}; use std::fmt; // NOTE: constant across presets use ethereum_consensus::phase0::mainnet::VALIDATOR_REGISTRY_LIMIT; diff --git a/spec-gen/src/generator.rs b/spec-gen/src/generator.rs index ec6d1e080..ad44ce7c1 100644 --- a/spec-gen/src/generator.rs +++ b/spec-gen/src/generator.rs @@ -131,9 +131,8 @@ impl Fork { let fragment: syn::File = parse_quote! { use std::cmp; use std::collections::HashSet; - use ssz_rs::prelude::*; + use crate::ssz::prelude::*; use crate::crypto::{hash, verify_signature, fast_aggregate_verify}; - use crate::ssz::*; pub use crate::altair::fork::upgrade_to_altair; }; @@ -145,10 +144,9 @@ impl Fork { use std::mem; use std::collections::{HashSet, HashMap}; use std::iter::zip; - use ssz_rs::prelude::*; + use crate::ssz::prelude::*; use integer_sqrt::IntegerSquareRoot; use crate::crypto::{hash, verify_signature, fast_aggregate_verify, eth_aggregate_public_keys, eth_fast_aggregate_verify}; - use crate::ssz::*; pub use crate::bellatrix::fork::upgrade_to_bellatrix; }; @@ -160,10 +158,9 @@ impl Fork { use std::mem; use std::collections::{HashSet, HashMap}; use std::iter::zip; - use ssz_rs::prelude::*; + use crate::ssz::prelude::*; use integer_sqrt::IntegerSquareRoot; use crate::crypto::{hash, verify_signature, fast_aggregate_verify, eth_aggregate_public_keys, eth_fast_aggregate_verify}; - use crate::ssz::*; pub use crate::capella::fork::upgrade_to_capella; }; @@ -175,10 +172,9 @@ impl Fork { use std::mem; use std::collections::{HashSet, HashMap}; use std::iter::zip; - use ssz_rs::prelude::*; + use crate::ssz::prelude::*; use integer_sqrt::IntegerSquareRoot; use crate::crypto::{hash, verify_signature, fast_aggregate_verify, eth_aggregate_public_keys, eth_fast_aggregate_verify}; - use crate::ssz::*; pub use crate::deneb::fork::upgrade_to_deneb; }; diff --git a/test-gen/src/main.rs b/test-gen/src/main.rs index 97035904f..bafdc5277 100644 --- a/test-gen/src/main.rs +++ b/test-gen/src/main.rs @@ -175,25 +175,25 @@ fn generate_suite_src( if needs_spec_import { writeln!(src, "use ethereum_consensus::{fork}::{config} as spec;").unwrap(); - writeln!(src, "use ssz_rs::prelude::*;").unwrap(); } // special case imports here... - if matches!(runner, "transition") { - writeln!( - src, - "use ethereum_consensus::state_transition::{config}::{{Executor, BeaconState}};", - ) - .unwrap(); - let pre_fork = match spec { - Spec::Altair => "phase0", - Spec::Bellatrix => "altair", - _ => unimplemented!("support other forks"), - }; - writeln!(src, "use ethereum_consensus::{pre_fork}::{config} as pre_spec;",).unwrap(); - } - if matches!(runner, "fork") { - match spec { + match runner { + "ssz_static" => writeln!(src, "use ethereum_consensus::ssz::prelude::*;").unwrap(), + "transition" => { + writeln!( + src, + "use ethereum_consensus::state_transition::{config}::{{Executor, BeaconState}};", + ) + .unwrap(); + let pre_fork = match spec { + Spec::Altair => "phase0", + Spec::Bellatrix => "altair", + _ => unimplemented!("support other forks"), + }; + writeln!(src, "use ethereum_consensus::{pre_fork}::{config} as pre_spec;",).unwrap(); + } + "fork" => match spec { Spec::Altair => { writeln!(src, "use ethereum_consensus::phase0::{config} as phase0;").unwrap(); } @@ -201,8 +201,10 @@ fn generate_suite_src( writeln!(src, "use ethereum_consensus::altair::{config} as altair;").unwrap(); } _ => todo!("support other forks"), - } + }, + _ => {} } + let mut test_cases = tests.keys().cloned().collect::>(); test_cases.sort(); for test_case in &test_cases { diff --git a/test-gen/src/template.rs b/test-gen/src/template.rs index 1ff5fcdd6..cd043dd9e 100644 --- a/test-gen/src/template.rs +++ b/test-gen/src/template.rs @@ -419,8 +419,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::AggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AggregateAndProof = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -433,8 +433,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Attestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Attestation = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -447,8 +447,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::AttestationData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttestationData = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -461,8 +461,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::AttesterSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::AttesterSlashing = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -475,8 +475,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::BeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlock = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -489,8 +489,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::BeaconBlockBody = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockBody = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -503,8 +503,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::BeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconBlockHeader = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -517,8 +517,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::BeaconState = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::BeaconState = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -531,8 +531,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Checkpoint = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Checkpoint = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -545,8 +545,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::ContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ContributionAndProof = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -559,8 +559,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Deposit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Deposit = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -573,8 +573,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::DepositData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositData = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -587,8 +587,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::DepositMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::DepositMessage = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -601,8 +601,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Eth1Block = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Block = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -615,8 +615,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Eth1Data = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Eth1Data = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -629,8 +629,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::ExecutionPayload = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayload = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -643,8 +643,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::ExecutionPayloadHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ExecutionPayloadHeader = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -657,8 +657,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Fork = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Fork = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -671,8 +671,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::ForkData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ForkData = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -685,8 +685,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::HistoricalBatch = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::HistoricalBatch = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -699,8 +699,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::IndexedAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::IndexedAttestation = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -713,8 +713,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::LightClientUpdate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::LightClientUpdate = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -727,8 +727,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::PendingAttestation = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PendingAttestation = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -741,8 +741,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::PowBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::PowBlock = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -755,8 +755,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::ProposerSlashing = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::ProposerSlashing = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -769,8 +769,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SignedAggregateAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedAggregateAndProof = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -783,8 +783,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SignedBeaconBlock = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlock = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -797,8 +797,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SignedBeaconBlockHeader = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedBeaconBlockHeader = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -811,8 +811,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SignedContributionAndProof = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedContributionAndProof = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -825,8 +825,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SignedVoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SignedVoluntaryExit = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -839,8 +839,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SigningData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SigningData = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -853,8 +853,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SyncAggregate = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregate = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -867,8 +867,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SyncAggregatorSelectionData = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncAggregatorSelectionData = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -881,8 +881,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SyncCommittee = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommittee = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -895,8 +895,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SyncCommitteeContribution = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeContribution = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -909,8 +909,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::SyncCommitteeMessage = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::SyncCommitteeMessage = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -923,8 +923,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::Validator = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::Validator = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })" @@ -937,8 +937,8 @@ pub fn build_index() -> HashMap<&'static str, HashMap<&'static str, Auxillary>> test_case_type_generics: Default::default(), preamble: Default::default(), execution_handler: HashMap::from_iter([(Spec::All, "execute(|encoding| { - let mut data: spec::VoluntaryExit = ssz_rs::deserialize(encoding).unwrap(); - let serialized = ssz_rs::serialize(&data).unwrap(); + let mut data: spec::VoluntaryExit = ethereum_consensus::ssz::prelude::deserialize(encoding).unwrap(); + let serialized = ethereum_consensus::ssz::prelude::serialize(&data).unwrap(); let root = data.hash_tree_root().unwrap(); (serialized, root) })"